Sequenced socket (SOCK_SEQPACKET) connection

Sequenced Packet Socket connections are connection oriented sockets. The normal socket connection APIs such as bind/listen/accept/connect are used to establish a socket connection. In all respects, as far as the connection establishment is concerned, it is equivalent to a TCP stream socket connection. The SOCK_SEQPACKET socket connection has the below properties: The TCP stream socket […]

SocketPair Socket Connection

Till now we have seen examples wherein the socket connection is between two distinct processes. “socketpair API” socket connection allows a user to create a socket link between a Parent process and it’s child process. Each process (ie. the parent and its child) gets two handles. The parent socket handle and the child socket handle. […]

Abstract Namespace Socket Connections

When we create Unix Domain (AF_UNIX) sockets, we create a socket path in the file system, but what if we do not create a specific file-system path for the socket connection. The abstract namespace socket allows the creation of a socket connection which does not require a path to be created. Abstract namespace sockets disappear […]

The Connected UDP Socket Code Example

Some interesting aspects of the code for an UDP connected socket code are as below Both bind to their respective endpoints Both endpoints invoke connect command to connect to one another both know the endpoint that they are going to connect to The client port chosen in the sample code is 50001 and the server […]

The Connected UDP socket code – setup

To Test the connected UDP socket code on the same host system, we need to setup two distinct endpoints so that we can test the code on the same host system. Check the interface by running the command “ifconfig” on the linux terminal. Part output on my test system is provided below. (Note – the […]