-
Notifications
You must be signed in to change notification settings - Fork 0
Very basics about Sockets, TCPs and network data transfer
How Processes communicates in IPC over networks? Each process when comes up needs to talk to external world. It does so by means of sockets. In unix philosophy sockets are nothing but file descriptors since everything in unix world is a file. When any other process or application within the system or in the network needs to communicate to the process it can read and write to these special files which are called socket. To abstract the nitty-gritties of reading, writing and synchronizing these sockets OS provides simple socket commands which are used by programming languages to provide socket APIs. Other processes can use these APIs to read/write from this socket. To be able to communicate external processes needs socket address. To solve this socket is bind to a "port" which is a TCP port and a combination of ip:tcp_port can uniquely identify a socket and can be used for communication with the given process