Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void writeAssignedChannel(SelectionKey key, Selector sel) throws IOException {
- if (key.attachment() == null) {
- key.attach(new StringBuilder());
- }
- StringBuilder builder = (StringBuilder) key.attachment();
- String data = ByteBufferUtil.readFromChannelBuffered(channel);
- stringBuilder.append(data);
- if (data.endsWith(delimiter)) {
- }
- //TODO
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement