if (version == MessagingService.current_version)
{
int size = input.readInt();
byte[] headerBytes = new byte[size];
input.readFully(headerBytes);
stream(StreamHeader.serializer.deserialize(new DataInputStream(new FastByteArrayInputStream(headerBytes)), version), input);
}
else
{
// streaming connections are per-session and have a fixed version. we can't do anything with a wrong-version stream connection, so drop it.
logger.error("Received stream using protocol version {} (my version {}). Terminating connection",