Mercurial > hg > RemoteEditor > Eclipse
comparison src/remoteeditor/network/REPPacketSend.java @ 98:dd811063bbc5
*** empty log message ***
author | pin |
---|---|
date | Sat, 22 Dec 2007 15:07:03 +0900 |
parents | b1710c49c883 |
children | cf4df4f73605 |
comparison
equal
deleted
inserted
replaced
97:dacc546ac632 | 98:dd811063bbc5 |
---|---|
12 public REPPacketSend(SocketChannel sc){ | 12 public REPPacketSend(SocketChannel sc){ |
13 socketchannel = sc; | 13 socketchannel = sc; |
14 } | 14 } |
15 | 15 |
16 public ByteBuffer pack(REPCommand command){ | 16 public ByteBuffer pack(REPCommand command){ |
17 //command.setString(command.string + ":temp:123456"); //あとで書き直す | 17 //command.setString(command.string + ":temp:123456"); |
18 System.out.println("send command: " + command.toString()); | 18 System.out.println("send command: " + command.toString()); |
19 ByteBuffer buffer = ByteBuffer.allocateDirect(24+(command.string).length()*2); | 19 ByteBuffer buffer = ByteBuffer.allocateDirect(24+(command.string).length()*2); |
20 buffer.clear(); // position = 0 | 20 buffer.clear(); // position = 0 |
21 buffer.putInt(command.cmd); buffer.putInt(command.sid); buffer.putInt(command.eid); | 21 buffer.putInt(command.cmd); buffer.putInt(command.sid); buffer.putInt(command.eid); |
22 buffer.putInt(command.seq); buffer.putInt(command.lineno); | 22 buffer.putInt(command.seq); buffer.putInt(command.lineno); |