| | |
| | | |
| | | private boolean closeInitiated = false; |
| | | |
| | | private short protocolVersion = ProtocolVersion.getCurrentVersion(); |
| | | |
| | | /** |
| | | * Creates a new SocketSession based on the provided socket. |
| | |
| | | /* We do not want the heartbeat to close the session when */ |
| | | /* we are processing a message even a time consuming one. */ |
| | | lastReceiveTime=0; |
| | | return ReplicationMsg.generateMsg(buffer); |
| | | return ReplicationMsg.generateMsg(buffer, protocolVersion); |
| | | } |
| | | catch (OutOfMemoryError e) |
| | | { |
| | |
| | | { |
| | | return closeInitiated; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public void setProtocolVersion(short version) |
| | | { |
| | | protocolVersion = version; |
| | | } |
| | | } |