@Override void implClose() throws IOException { // close socket (may cause outstanding async I/O operations to fail). closesocket0(handle); // waits until all I/O operations have completed ioCache.close(); // release arrays of WSABUF structures unsafe.freeMemory(readBufferArray); unsafe.freeMemory(writeBufferArray); // finally disassociate from the completion port (key can be 0 if // channel created when group is shutdown) if (completionKey != 0) iocp.disassociate(completionKey); }
/** Invoked by Iocp when an I/O operation competes. */ @Override public <V, A> PendingFuture<V, A> getByOverlapped(long overlapped) { return ioCache.remove(overlapped); }