Search in sources :

Example 1 with HttpSocketImpl

use of org.webpieces.httpclient11.impl.HttpSocketImpl in project webpieces by deanhiller.

the class DirectHttp11Client method createHttpSocket.

public HttpSocket createHttpSocket(HttpSocketListener closeListener) {
    ConnectionListener listener = mgr.getHttpConnection();
    MockTcpChannel channel = new MockTcpChannel(false);
    return new HttpSocketImpl(new DelayedProxy(listener, channel), parser, closeListener, false);
// return new Http11SocketImpl(listener, channel, parser, false);
}
Also used : MockTcpChannel(org.webpieces.webserver.test.MockTcpChannel) ConnectionListener(org.webpieces.nio.api.handlers.ConnectionListener) HttpSocketImpl(org.webpieces.httpclient11.impl.HttpSocketImpl)

Example 2 with HttpSocketImpl

use of org.webpieces.httpclient11.impl.HttpSocketImpl in project webpieces by deanhiller.

the class DirectHttp11Client method createHttpsSocket.

public HttpSocket createHttpsSocket(SSLEngine engine, HttpSocketListener closeListener) {
    ConnectionListener listener = mgr.getHttpsConnection();
    MockTcpChannel channel = new MockTcpChannel(true);
    return new HttpSocketImpl(new DelayedProxy(listener, channel), parser, closeListener, true);
}
Also used : MockTcpChannel(org.webpieces.webserver.test.MockTcpChannel) ConnectionListener(org.webpieces.nio.api.handlers.ConnectionListener) HttpSocketImpl(org.webpieces.httpclient11.impl.HttpSocketImpl)

Aggregations

HttpSocketImpl (org.webpieces.httpclient11.impl.HttpSocketImpl)2 ConnectionListener (org.webpieces.nio.api.handlers.ConnectionListener)2 MockTcpChannel (org.webpieces.webserver.test.MockTcpChannel)2