added a couple more JS APIs and removed some debug code

This commit is contained in:
ZappoMan 2013-11-10 12:33:54 -08:00
parent 43a4253689
commit eb73de6b67
2 changed files with 8 additions and 6 deletions

View file

@ -50,6 +50,12 @@ public slots:
/// \param scale the scale of the voxel (in VS space)
void queueVoxelDelete(float x, float y, float z, float scale);
/// set the max packets per second send rate
void setPacketsPerSecond(int packetsPerSecond) { return _voxelPacketSender.setPacketsPerSecond(packetsPerSecond); }
/// get the max packets per second send rate
int getPacketsPerSecond() const { return _voxelPacketSender.getPacketsPerSecond(); }
/// does a voxel server exist to send to
bool voxelServersExist() const { return _voxelPacketSender.voxelServersExist(); }

View file

@ -44,12 +44,8 @@ public:
/// \thread any thread, typically the application thread
void queuePacketForSending(sockaddr& address, unsigned char* packetData, ssize_t packetLength);
void setPacketsPerSecond(int packetsPerSecond) {
_packetsPerSecond = std::max(MINIMUM_PACKETS_PER_SECOND, packetsPerSecond);
if (!isThreaded()) {
printf("setPacketsPerSecond()... this=%p _packetsPerSecond=%d\n", this, _packetsPerSecond);
}
}
void setPacketsPerSecond(int packetsPerSecond)
{ _packetsPerSecond = std::max(MINIMUM_PACKETS_PER_SECOND, packetsPerSecond); }
int getPacketsPerSecond() const { return _packetsPerSecond; }
void setPacketSenderNotify(PacketSenderNotify* notify) { _notify = notify; }