The important thing to understand is that TCP provides a *byte-stream* between two endpoints. In practice, the bytes will be grouped into IP packets, but that grouping is a matter of the TCP implementation -- that grouping is not visible to the higher layers of the stack and is not allowed to be meaningful.
If the TCP connection is for SIP, then SIP messages follow each other in the TCP stream. The messages are not logically connected in any way; each message is processed based on its contents only (except for some special rules regarding how to route responses). The first SIP message begins at the first byte of the TCP stream. The message is required to contain a Content-Length header telling the length of the body. The end of the headers is determined by the CR-LF-CR-LF sequence (empty line), and following that is the body whose length is specified by the Content-Length header. Immediately after the body of the first message, the second message begins. Etc. (IP packet boundaries may fall at any place in any message, and that is not significant.) Dale _______________________________________________ Sip mailing list https://www.ietf.org/mailman/listinfo/sip This list is essentially closed and only used for finishing old business. Use [email protected] for questions on how to develop a SIP implementation. Use [email protected] for new developments on the application of sip. Use [email protected] for issues related to maintenance of the core SIP specifications.
