this.socket = socket;
int buffersize = HttpConnectionParams.getSocketBufferSize(params);
HttpDataTransmitter transmitter = new SocketHttpDataTransmitter(socket, buffersize);
HttpDataReceiver receiver = new SocketHttpDataReceiver(socket, buffersize);
transmitter.reset(params);
receiver.reset(params);
setHttpDataReceiver(receiver);
setHttpDataTransmitter(transmitter);
setMaxHeaderCount(params.getIntParameter(HttpConnectionParams.MAX_HEADER_COUNT, -1));