Mercurial > hg > RemoteEditor > REPSessionManager
diff rep/REPPacketSend.java @ 45:10f1adf6d74d
*** empty log message ***
author | pin |
---|---|
date | Sun, 11 Nov 2007 00:26:35 +0900 |
parents | 618d76c06b9e |
children | f4eb7fd098c4 |
line wrap: on
line diff
--- a/rep/REPPacketSend.java Sun Nov 11 00:19:19 2007 +0900 +++ b/rep/REPPacketSend.java Sun Nov 11 00:26:35 2007 +0900 @@ -17,6 +17,9 @@ public ByteBuffer pack(REPCommand command){ System.out.println("send command: " + command.toString()); + if(command.string == null){ + command.setString("test"); + } ByteBuffer buffer = ByteBuffer.allocateDirect(24+(command.string).length()*2); buffer.clear(); // position = 0 buffer.putInt(command.cmd); buffer.putInt(command.sid); buffer.putInt(command.eid); @@ -61,7 +64,7 @@ public void send(REPCommand command){ try { - socketchannel.write(packUConv(command)); + socketchannel.write(pack(command)); //System.out.println(command.toString()); } catch (IOException e) { e.printStackTrace();