Added debugging statement when sending an object
This commit is contained in:
parent
5ea896d52b
commit
05f4fd33f5
@ -37,14 +37,16 @@ public class ObjectWriteProxy {
|
||||
*/
|
||||
public void write(long recipientSocketID, Object obj) throws IOException {
|
||||
// Create message targeted at the client
|
||||
Message response = writeProxy.getMessage();
|
||||
final Message response = writeProxy.getMessage();
|
||||
response.socketId = recipientSocketID;
|
||||
|
||||
System.out.println("Sending object " + obj);
|
||||
|
||||
// Serialize object to byte array
|
||||
byte[] objBytes = SerializationUtils.writeToByteArray(obj);
|
||||
final byte[] objBytes = SerializationUtils.writeToByteArray(obj);
|
||||
|
||||
// Acquire object length in bytes
|
||||
byte[] objLen = SerializationUtils.intToBytes(objBytes.length);
|
||||
final byte[] objLen = SerializationUtils.intToBytes(objBytes.length);
|
||||
|
||||
response.writeToMessage(objLen);
|
||||
response.writeToMessage(objBytes);
|
||||
|
Reference in New Issue
Block a user