Types of Communication

 < Day Day Up > 



Now that we've looked at the basic protocols in the IP suite, let's look at the various communication models that are possible and how they map to the previously discussed protocols. In the coming chapters, we investigate patterns for creating servers and clients in each of the communication models. Each language chapter also includes example code illustrating each of the models.

Stream

In the stream mode, a conduit between two endpoints is created allowing a stream of bytes to flow bidirectionally. The stream implies that no framing occurs in the communication; the stream protocol may aggregate or split the data as it's sent. Example stream protocols include TCP and SCTP.

Datagram

In datagram mode, messages are sent from a source and a destination, without any connection setup. Messages are transferred between the source and destination, which means framing occurs within the transport protocol. Because no setup is required, datagrams received include not just the payload, but also source information. This allows the receiver to discern the sender, in the event a response is generated. An example datagram protocol is UDP.

Broadcast

The broadcast mode, as the name implies, refers to communication between all entities on a network. Broadcast is based upon the datagram mode, as it's message-oriented and permits transmission without prior setup to all receivers. Broadcast can be performed using UDP.

Multicast

The multicast mode permits the creation of a group of receivers on a network, for which a sender can transmit a message to a single address (the group), but all receivers in the group receive the message. This mode is similar to broadcast, but supports more efficient operation because not all hosts must interact with messages as is the case with broadcast communication. Multicast is also UDP-based.



 < Day Day Up > 



BSD Sockets Programming from a Multi-Language Perspective
Network Programming for Microsoft Windows , Second Edition (Microsoft Programming Series)
ISBN: 1584502681
EAN: 2147483647
Year: 2003
Pages: 225
Authors: Jim Ohlund

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net