<p>As most readers nowadays will be more familiar with <a href="http://wiki.wireshark.org/TCP">TCP</a>, COTP is explained comparing both protocols as they are both used to transport users's data reliably over a network. <p>Packet-based vs. stream-based: COTP transports <em>packets of data</em> from one user to the other, so the receiver will get exactly the same data boundaries as the sender transmitted. <a href="http://wiki.wireshark.org/TCP">TCP</a> transports a <em>continuous stream</em> of data to the receiver, so the protocol on top of TCP often has to add such boundaries itself (see the <a href="http://wiki.wireshark.org/TPKT">TPKT</a> protocol for such a protocol). <p>TSAP's vs. ports: To multiplex several conversations between two hosts, COTP uses TSAP's which are variable length binary blobs (often a meaningful string is used). These TSAP's are matched at connection establishing phase, and replaced by the 2 byte (destination/source) references at data transfer. TCP uses ports for this. One notable difference is that TSAP's are singletons - if a TSAP is used for a connection it cannot be used by another. XXX - Needs clarification. A single TSAP (Transport Service Access Point) may be used by multiple connections. <h4>History</h4> <p>This protocol has been replaced by <a href="http://wiki.wireshark.org/TCP">TCP</a> in most applications. Applications that used COTP before, will often use the <a href="http://wiki.wireshark.org/TPKT">TPKT</a> protocol on top of <a href="http://wiki.wireshark.org/TCP">TCP</a> now.</p>
转载于:https://my.oschina.net/rookiedavin/blog/152351