equal
deleted
inserted
replaced
91 } |
91 } |
92 |
92 |
93 |
93 |
94 public Socket accept() throws IOException { |
94 public Socket accept() throws IOException { |
95 synchronized (ssc.blockingLock()) { |
95 synchronized (ssc.blockingLock()) { |
96 if (!ssc.isBound()) |
|
97 throw new IllegalBlockingModeException(); |
|
98 try { |
96 try { |
|
97 if (!ssc.isBound()) |
|
98 throw new NotYetBoundException(); |
99 if (timeout == 0) { |
99 if (timeout == 0) { |
100 SocketChannel sc = ssc.accept(); |
100 SocketChannel sc = ssc.accept(); |
101 if (sc == null && !ssc.isBlocking()) |
101 if (sc == null && !ssc.isBlocking()) |
102 throw new IllegalBlockingModeException(); |
102 throw new IllegalBlockingModeException(); |
103 return sc.socket(); |
103 return sc.socket(); |