Sockets enable communication between computers in a network. Every time client machine need to talk to a server (for e.g.: client’s browser requesting a webpage from internet), a socket is opened, and it is used for transferring information between client and server. In general, sockets refer to Internet Protocol(IP) for relaying data packets across network boundaries. TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) are widely used protocols for one-to-one connections between two nodes in a network. TCP protocol guarantees the recipient will receive the packets in the order they are sent, but is relatively slow, hence suitable for applications that require higher message reliability. UDP is faster and does not guarantee that the messages or packets sent would reach at all. UDP is used when speed is desirable and error correction is not necessary. For example, UDP is frequently used for live broadcasts and online games. For this blog, we will focus on TCP sockets only and especially TCP socket communication with WSO2 ESB.