Computer network programming

Writing computer programs with networking capability


title: "Computer network programming" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["computer-networks-engineering", "computer-programming", "inter-process-communication"] description: "Writing computer programs with networking capability" topic_path: "engineering" source: "https://en.wikipedia.org/wiki/Computer_network_programming" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0

::summary Writing computer programs with networking capability ::

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 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

Main article: client–server model

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 ("server") is usually waiting for an incoming packet, and another party ("client") 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 (most of application-level programming belongs to L4 and up). The table below contains some examples of popular protocols belonging to different OSI/ISO layers, and popular APIs for them.

::data[format=table]

OSI/ISO LayerProtocolAPI
L3 (network)IPRaw socket
L4 (transport)TCP, UDP, SCTPBerkeley Sockets
L5 (session)TLSOpenSSL
L7 (application)HTTPVarious
::

References

  • W. Richard Stevens: UNIX Network Programming, Volume 1, Second Edition: Networking APIs: Sockets and XTI, Prentice Hall, 1998,

References

  1. (2017). "COMP1406".

::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::

computer-networks-engineeringcomputer-programminginter-process-communication