Closed ujos closed 6 years ago
Good point. Also, there is nothing in session messages that states whether a session is on a multiplexed transport. So there is no way to verify protocol conformance strictly from a message log. Not only about terminate, but also whether a Sequence or Context message is used for sequence numbers. I'm thinking that Negotiate should have an indicator that tells whether the session intends to follow non-multiplexed or multiplexed rules. (The XMIT spec that FIXP is based on does not have such an indicator.)
For multiplexing only the session which established the actual physical transport would be able to close it and this does not apply to the other logical sessions multiplexed on that transport. We were relying on the UUID to know which connection is the physical one and which connection is a logical multiplexed one
@adkapur , I would say it differently. Each session (identified by a UUID) equally "owns" a multiplexed transport. Not normative, but the transport's lifetime can be implemented as a reference-counted object. When each session terminates, it decrements the reference counter. When the counter is reduced to zero, the transport object is destroyed. Reference counting is a very common programming construct, e.g. C++ shared pointers.
@adkapur, Server side session, for example, does not establish transport. Transport usually is established by some lower level component, which manages incoming connections. After receiving first message (Negotiate or Establish), this Manager matches connection with Session.
Reference counting approach is more natural, imho.
From one side peer may terminate transport:
From another side peer must close transport:
So, must peer close transport?
Also in case of multiplexing, peer cannot terminate transport if there are more than one Sessions bound to Transport.