Perfecting 4th benchmark; adding needed MySQL config files; maturing Zigbee drivers
[iot2.git] / iotjava / iotrmi / Java / IoTSocket.java
index 848a2e97265cfd2dedaf5bbdbc76e64c7d2c7238..ba8af4a43fbe689eff8afcf160d892801cd450cb 100644 (file)
@@ -34,7 +34,8 @@ public abstract class IoTSocket {
        /**
         * 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)
 
        /**
@@ -82,8 +83,9 @@ public abstract class IoTSocket {
                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)
                {