Search in sources :

Example 1 with NioEndpoint

use of org.apache.tomcat.util.net.NioEndpoint in project tomcat70 by apache.

the class InternalNioInputBuffer method init.

// ------------------------------------------------------ Protected Methods
@Override
protected void init(SocketWrapper<NioChannel> socketWrapper, AbstractEndpoint<NioChannel> endpoint) throws IOException {
    socket = socketWrapper.getSocket();
    socketReadBufferSize = socket.getBufHandler().getReadBuffer().capacity();
    int bufLength = headerBufferSize + socketReadBufferSize;
    if (buf == null || buf.length < bufLength) {
        buf = new byte[bufLength];
    }
    pool = ((NioEndpoint) endpoint).getSelectorPool();
}
Also used : NioEndpoint(org.apache.tomcat.util.net.NioEndpoint) AbstractEndpoint(org.apache.tomcat.util.net.AbstractEndpoint)

Aggregations

AbstractEndpoint (org.apache.tomcat.util.net.AbstractEndpoint)1 NioEndpoint (org.apache.tomcat.util.net.NioEndpoint)1