src/main/java/org/java_websocket/server/WebSocketServer.java
private void doWrite(SelectionKey key) throws IOException {
		WebSocketImpl conn = (WebSocketImpl) key.attachment();
		if( SocketChannelIOHelper.batch( conn, conn.getChannel() ) ) {
			if( key.isValid() ) {
				key.interestOps(SelectionKey.OP_READ);
			}
		}
	}
private void doWrite(SelectionKey key) throws IOException {
		WebSocketImpl conn = (WebSocketImpl) key.attachment();
		if( SocketChannelIOHelper.batch( conn, conn.getChannel() ) ) {
			if( key.isValid() ) {
				key.interestOps(SelectionKey.OP_READ);
			}
		}
	}
Execute a write operation
@param key the selectionkey to write on
@throws IOException if an error happened during batch