RawReceivable response = null;
long endTime = System.currentTimeMillis() + myResponseTimeout;
do {
try {
Hl7OverHttpResponseDecoder d = new Hl7OverHttpResponseDecoder();
d.setSigner(mySigner);
d.setReadTimeout(myResponseTimeout);
d.readHeadersAndContentsFromInputStreamAndDecode(myInputStream);
response = new RawReceivable(d.getMessage());
InetSocketAddress remoteSocketAddress = (InetSocketAddress) socket.getRemoteSocketAddress();
String hostAddress = remoteSocketAddress.getAddress() != null ? remoteSocketAddress.getAddress().getHostAddress() : null;
response.addMetadata(MessageMetadataKeys.REMOTE_HOST_ADDRESS.name(), hostAddress);
if (d.isConnectionCloseHeaderPresent()) {
ourLog.debug("Found Connection=close header, closing socket");
closeSocket(socket);
}
} catch (NoMessageReceivedException ex) {