/** * Constructor for the <code>SocketWriter</code> object. This is * used to create a writer that can write packets to the socket * in such a way that it write either asynchronously or block * the calling thread until such time as the packets are written. * * @param socket this is the pipeline that this writes to * @param reactor this is the writer used to scheduler writes * @param threshold this is the threshold for asynchronous buffers */ public SocketController(Socket socket, Reactor reactor, int threshold) throws IOException { this.writer = new SocketWriter(socket, threshold); this.flusher = new SocketFlusher(socket, reactor, writer); }