The Ins and Outs of UDP
Issue: 4.1 (September/October 2005)
Author: Aaron Ballman
Article Description: No description available.
Article Length (in bytes): 14,091
Starting Page Number: 27
RBD Number: 4112
Resource File(s): None
Related Link(s): None
Known Limitations: None
Excerpt of article text...
Last time, we talked about what TCP is and how to use the TCPSocket class in REALbasic to communicate with another application over the network. In this article, we're going to cover another well-known protocol that REALbasic provides access to: the UDP protocol.
The basics of UDP
UDP is the User Datagram Protocol, which is a fast, unreliable way to send data across the network. It is different than the TCP protocol in a number of ways. For starters, it's a "connectionless" protocol. This means that setting the socket up works differently for a UDPSocket than it does for a TCPSocket. Also, the data transmission is unreliable, so you can't rely on packets you've sent reaching their destination. Despite these limitations, UDP has some very nice qualities to it. For instance, UDP data transmission is faster than TCP transmissions are, and you can send the same data to multiple machines using one call to Write. As you can see, there are some upsides and some downsides to using UDP. Let's talk a bit about when you want to use UDP instead of TCP.
...End of Excerpt. Please purchase the magazine to read the full article.
Article copyrighted by REALbasic Developer magazine. All rights reserved.