|
About U++ Sockets
Abouts Sockets
Connection-oriented sockets require 2 roles, a client and a server. A client is the entity that requests a connection. The server is the entity that accepts connections. Once a connection is established, then both sides can engage in information transfer.
In connectionless sockets, the client does not establish a connection with the server. It simply sends its information to the server. Under this scheme, on the packet level, your information is not guaranteed to be delivered; you will not be able to detect the successful delivery of your information. For one example, Connectionless sockets are typically used for live streaming applications where the loss of some information is not very important.
Sockets are similar to file I/O streams in that you read and write data from them. The main difference lies in the connection/communication process that goes along with sockets.
Sockets for Local (Inter-process) Communication
Many applications use connection-oriented or connectionless sockets for single-host communication (communication between processes on the same host/computer). This programming technique can be very useful and makes your applications scalable. Also, this allows you to test your application's communication on the same computer. In order to achieve this functionality, you would bind both client and server sockets to the localhost. Note though, high-performance parallel processing applications will use a library that allows for shared memory access or other IPC techniques.
Berkeley Software Distribution (BSD) and Winsock
U++ provides a wrapper around both Unix BSD and MS Windows winsock socket implementations. Winsock is a Windows-based implementation that is ALMOST completely compatible with BSD sockets. U++ hides the differences and gives you a single implementation that works on all supported operating systems.
For more information, read about the following topics:
BSD Sockets
Winsock
Transmission Control Protocol (TCP) / Connection-oriented protocols
User Datagram Protocol (UDP) / Connectionless protocols
|