Skip to content

Commit

Permalink
nio
Browse files Browse the repository at this point in the history
  • Loading branch information
conanguyw committed Jun 27, 2017
1 parent bb79821 commit fa0cbc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/gyw/study/nio/NIOServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public NIOServer(int port) throws IOException {
// 通过open()方法找到Selector
selector = Selector.open();
// 注册到selector,等待连接
serverSocketChannel.register(selector, SelectionKey.OP_ACCEPT|SelectionKey.OP_WRITE);
serverSocketChannel.register(selector, SelectionKey.OP_ACCEPT);
System.out.println("Server Start----8888:");
}

Expand Down

0 comments on commit fa0cbc5

Please sign in to comment.