/**
* Class Constant
*/
- protected static int BUFFSIZE = 128000; // how many bytes our incoming buffer can hold
+ protected static int BUFFSIZE = 128000; // how many bytes our incoming buffer can hold (original)
+ //protected static int BUFFSIZE = 8388608; // 8388608 = 2^23 bytes of memory (8MB) - this is required by our IHome speaker driver
protected static int MSG_LEN_SIZE = 4; // send length in the size of integer (4 bytes)
/**
input.read(lenBytes, 0, MSG_LEN_SIZE);
int maxlen = ByteBuffer.wrap(lenBytes).getInt();
// Receive until maxlen
- if (maxlen>BUFFSIZE)
- System.out.println("IoTSocketClient/Server: Sending more bytes then will fit in buffer!");
+ if (maxlen>BUFFSIZE) {
+ System.out.println("IoTSocketClient/Server: Sending more bytes then will fit in buffer! Number of bytes: " + maxlen);
+ }
val = new byte[maxlen];
while (totalbytes < maxlen)
{