Network Socket

By Xah Lee. Date: .

Network Socket

Network Socket is basically a API for programs to talk to the network. A socket address is a combination of IP address and a port number.

So, when a browser, or email app, want to talk to the internet, they talk to the socket. The socket is usually provided by the Operating System as a API. The programer don't have to worry about TCP/IP details, he just create a socket (by calling a function or new object), specify IP address, port number, and type of connection, and call functions/methods to send/receive data on it.

Here's sample doc of coding socket in different programing languages: