socket

I/O multiplexing: select, poll and epoll in Linux

1.0 I/O multiplexing I/O multiplexing is the the ability to perform I/O operations on multiple file descriptors. Input operations like read, accept and calls for receiving messages block when there is no incoming data. So, if an input call is made and it blocks, we may miss data from other file descriptors. To circumvent this, …

I/O multiplexing: select, poll and epoll in Linux Read More »

Interprocess Communication using Unix Domain Sockets

1.0 Unix Domain Sockets A socket is a communication endpoint at a host computer. The socket API provides calls for communication between processes. The socket system call is, int socket (int domain, int type, int protocol); The first parameter to the socket system call is the domain. The domain is actually the communication domain and …

Interprocess Communication using Unix Domain Sockets Read More »

nginx 502 Bad Gateway

1.0 502 Bad Gateway After the update of Linux on the web server, the website would not open in the browser. Instead the following error was displayed. 502 Bad Gateway nginx/1.14.0 2.0 Solution First we check the nginx server. $ systemctl status nginx ● nginx.service – A high performance web server and a reverse proxy …

nginx 502 Bad Gateway Read More »

Socket Programming using TCP in C

1.0 Client-server model Client server model is a software architecture paradigm prevalent in distributed applications. A server has information resources and processes that provide answers to queries and other services to remote clients over the network. Some of the examples of these services are booking an airline ticket and/or a room in a hotel, sending …

Socket Programming using TCP in C Read More »

ss command in Linux

1. ss command The ss command gives the socket statistics. It gives information about the network connections. ss is a replacement for the netstat command. By default, the ss command gives information about non-listening sockets. $ ss Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port u_str ESTAB 0 0 * 4482 * 4481 u_str ESTAB …

ss command in Linux Read More »