DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Developing applications using XTI or TLI

Structure of transmitted data

When a process reads data from a transport endpoint in connection-oriented mode, the data can appear to be either a continuous stream of bytes (stream-oriented input) or a sequence of messages with message boundaries preserved (record-oriented input).

In the case of a continuous byte stream, the reading process cannot tell how many individual messages were sent to it, nor where one message stops and the next one begins. If message boundaries are preserved, however, the reading process can detect the end of one message and the start of another. Depending on the transport provider being used, a process reading incoming data on a transport endpoint will see one or the other of these two forms.

When a process reads data from a transport endpoint in connectionless mode, it always receives a datagram (also known as a ``message''). A datagram is a self-contained unit with a start and an end indicator for the data. When a process sends datagrams (by calling t_sndudata), each datagram is sent individually to the remote process. The receiving process then retrieves each datagram (by calling t_rcvudata) one at a time.

This is different from sending data over a connection. In connection-oriented mode, the sending process calls t_snd to transmit data. A process may call t_snd several times before it turns around and waits to receive data from the remote process (it does this by calling t_rcv). At the other end, the receiving process may get all of the data that was sent to it with a single call to t_rcv. Because the receiving process sees a byte stream as it reads data, it has no idea how many times the sending process called t_snd, nor what data was sent with each of those calls.


Next topic: Priority of transmitted data
Previous topic: Flow of transmitted data

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003