return written;
}
- private static void cancelKey(final NioChannel socket, final SelectionKey key) {
- socket.getPoller().addEvent(
- new Runnable() {
- public void run() {
- socket.getPoller().cancelledKey(key,SocketStatus.ERROR,false);
- }
- });
- }
-
/**
* Performs a blocking read using the bytebuffer for data to be read
* If the <code>selector</code> parameter is null, then it will perform a busy read that could
return read;
}
+ private static void cancelKey(final NioChannel socket, final SelectionKey key) {
+ socket.getPoller().addEvent(
+ new Runnable() {
+ public void run() {
+ socket.getPoller().cancelledKey(key,SocketStatus.ERROR,false);
+ }
+ });
+ }
+
}
\ No newline at end of file