Open mspang opened 2 years ago
This is a critical issue regarding future-proofing for TCP support.
The spec says:
4.3.4. Common TXT Key/Value Pairs ...
The optional key T indicates whether the Node supports TCP. This key MAY optionally be provided by a Node that does not support TCP. If the key is not included or invalid, the Node querying the service record SHALL assume the default value of T=0 indicating TCP is not supported. The T key, if included, SHALL have one of two valid values: '0' to indicate "TCP not supported", or '1' to indicate "TCP supported".
Example: T=1 to announce TCP is supported by the advertising Node.
The issue is the vagueness of "TCP support". It was meant to indicate "Matter operational TCP transport" rather than "MRP over UDP". This is more clear in:
4.12.1.2. Session Establishment over IP When establishing a session over IP, the initiator SHALL use TCP when both of the following are true:
The initiator supports TCP
The responder supports TCP as indicated by the
T
flag (*NOTE: theT
here points to section 4.3.4 as a hyperlink).If one or both nodes do not support TCP, the initiator SHALL use MRP to establish the session.
The choice of transport used during session establishment SHALL be used for the transport of messages of the established session.
Overall we never fully implemented/tested TCP support in Matter. TCP support is not actually used or supported by the transport layer in Matter 1.0 SDK!. Therefore, even if there is some TCP plumbing (and in fact, some platforms like Android require the TCPEndpointManager to be supported, there is no logic present to ever handle the lifecycle of the connections, or dispatch messages over TCP transport. None of it was tested either.
The code that exists for TCP support is vestigial from Weave and ready to be integrated to start implementing TCP transport post-1.0. For 1.0, all devices should never announce T=1. Otherwise, we will have trouble with post-1.0 devices where the initiator of an interaction supports TCP for real, in how it will be used if the responder claims TCP support due to invalid plumbing of the "TCP supported" condition. An alternative is to be clear in post-1.0 and in a 1.0 errata, that TCP support is provisional, and we would have to invent a T=2 to mean "Matter TCP support really supported.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This stale issue has been automatically closed. Thank you for your contributions.
Depending on platform, this is set by default
but in particular, the overall default is 'true' despite not being implemented