The Connected UDP Socket connection

We all hear that UDP is a connection less protocol. As also seen from the previous examples, it is observed that there is no peer connection established. But what if we wish to create an UDP socket connection and not a TCP connection between two dedicated endpoints.  The connect API allows us to achieve the […]

Unix Domain UDP Socket Connection Example

The Unix Domain UDP Socket Connection follows the same method and APIs as the internet (AF_INET) UDP Socket connection.  The differences between the AF_INET socket and the Unix Domain Datagram socket are as follows Instead of an IP address – a socket path for the server and the client is required. In an UDP socket […]

Analyzing the Unix Domain Stream Socket Code

The Unix domain stream socket code is provided here. As always, let us look at how the connection establishment and data transfer occurs in an Unix Stream socket connection As referenced in Wikipedia , the unix socket references the file system of the local host system and processes view the socket as file system inodes.  […]

Understanding the Unix Stream Socket Connection

The Unix stream socket connection follows the same set of calls as that of a stream connection as used for a internet protocol (AF_INET) stream socket connection. The connection process is provided below The structures that are used in an Unix domain stream socket differ from the internet protocol (AF_INET) stream socket connection. Also, in […]

Socket based IPC – Unix Domain Sockets

Unix domain sockets are used as a means for Inter-Process communication within the same host/operating system. The Unix domain socket uses the AF_UNIX as the Domain and can use SOCK_STREAM, SOCK_DGRAM or SOCK_SEQPACKET as the socket type. The different socket types will be discussed in a different articles. The next set of articles deals with […]

Analyzing the UDP Socket connection

The UDP socket example is provided at this link here. The initial part of the code on the server side is to create a UDP socket. Note the type field which is set to SOCK_DGRAM (as opposed to SOCK_STREAM in a stream socket connection).     if (0 > (sock_udp_server = socket(AF_INET, SOCK_DGRAM, 0))) {  […]

UDP Server/client example

The interested reader can refer an introduction on UDP socket connection in the previous article <A UDP Socket Connection>. In this article we look at the server/client code example and examine its intricacies in the following article. In UDP socket connection establishment – the following occurs The UDP server binds itself to a port. The […]

A UDP Socket connection

UDP stands for User Datagram Protocol. As the name suggests, data is sent out as a complete message (or datagram) in contrast to stream socket where message boundaries are not preserved. The User Datagram Protocol (UDP) sits at the same level as the Transmission Control Protocol (TCP). However, it is a connection-less protocol as against […]