}
}
private void connectToStateProvider(StateHeader hdr)
{
IpAddress address = hdr.bind_addr;
String tmp_state_id = hdr.getStateId();
StreamingInputStreamWrapper wrapper = null;
StateTransferInfo sti = null;
final Socket socket = new Socket();
try
{
socket.bind(new InetSocketAddress(bind_addr, 0));
int bufferSize = socket.getReceiveBufferSize();
socket.setReceiveBufferSize(socket_buffer_size);
if (log.isDebugEnabled())
log.debug("Connecting to state provider " + address.getIpAddress() + ":" + address.getPort()
+ ", original buffer size was " + bufferSize + " and was reset to " + socket.getReceiveBufferSize());
socket.connect(new InetSocketAddress(address.getIpAddress(), address.getPort()));
if (log.isDebugEnabled())
log.debug("Connected to state provider, my end of the socket is " + socket.getLocalAddress() + ":"
+ socket.getLocalPort() + " passing inputstream up...");
//write out our state_id and address so state provider can clear this request