projects
/
iot2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adding missing stub and skeleton files for 3rd benchmark; Increasing incoming buffer...
[iot2.git]
/
iotjava
/
iotrmi
/
Java
/
IoTSocket.java
diff --git
a/iotjava/iotrmi/Java/IoTSocket.java
b/iotjava/iotrmi/Java/IoTSocket.java
index 848a2e97265cfd2dedaf5bbdbc76e64c7d2c7238..8db9a9114503bd397c1b13ef25207fcaabadd50c 100644
(file)
--- a/
iotjava/iotrmi/Java/IoTSocket.java
+++ b/
iotjava/iotrmi/Java/IoTSocket.java
@@
-34,7
+34,8
@@
public abstract class IoTSocket {
/**
* Class Constant
*/
/**
* 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)
/**
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
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)
{
val = new byte[maxlen];
while (totalbytes < maxlen)
{