Computer network programming


Computer network programming involves writing computer programs that enable processes to communicate with each other across a computer network.

Connection-oriented and connectionless communications

Very generally, most of communications can be divided into connection-oriented, and connectionless. Whether a communication is a connection-oriented, or connectionless, is defined by the communication protocol, and not by. Examples of the connection-oriented protocols include and, and examples of connectionless protocols include, "raw IP", and.

Clients and Servers

For connection-oriented communications, communication parties usually have different roles. One party is usually waiting for incoming connections; this party is usually referred to as "server". Another party is the one which initiates connection; this party is usually referred to as "client".
For connectionless communications, one party is usually waiting for an incoming packet, and another party is usually understood as the one which sends an unsolicited packet to "server".

Popular protocols and APIs

Network programming traditionally covers different layers of OSI/ISO model. The table below contains some examples of popular protocols belonging to different OSI/ISO layers, and popular APIs for them.
OSI/ISO LayerProtocolAPI
L3 IPRaw socket
L4 TCP, UDP, SCTPBerkeley Sockets
L5 TLSOpenSSL
L7 HTTPVarious