TcpMsgSession is implemented by the cxMessage2 library. Object instances of type TcpMsgSession are created by either a TcpMsgClient or TcpMsgServer for each socket connection which is created.
The TcpMsgSession makes calls on an object that implements interface ITcpMsgSessionHandler to obtain the messages to be sent and forward on the messages that are received.
A TcpMsgSession manages both the reading and writing of messages on a connected stream oriented socket using both a MsgWriteBuffer and MsgReadBuffer.
MsgWriteBuffer and MsgReadBuffer are concerned with the buffering of messages as well as the division of a byte stream into variable length messages. This is achieved with zero copy overhead on both the writer and reader.
There are numerous settings that affect the performance of these buffers. See MessageWriterSettings and MessageReaderSettings.