Preview lessons, content and tests

Computer Science & Programming solved. All in one platform.

1. To trial the platform and take tests, please take a few seconds to SIGN UP and SET UP FREE.
2. Searching for something specific? See our text overview of all tests. Scroll right for levels, and lists.

Student and Teacher User Guides |   Schemes of Work |   Real Teacher use Videos |

Join 30000+ teachers and students using TTIO.

The role of sockets in TCP/IP

socket is one endpoint of a two-way communication link between two programs running on the network. A socket is bound to a port number so that the TCP layer can identify the application that data is destined to be sent to. An endpoint is a combination of an IP address and a port number

TCP Sockets

A connection between two computers uses a socket.

A socket is the combination of IP address plus port

Example

Imagine sitting on your PC at home, and you have two browser windows open. One looking at the Google website, and the other at the Yahoo website. The connection to Google would be:

Your PC – IP1+port 60200 ——– Google IP2 +port 80 (standard port) The combination IP1+60200 = the socket on the client computer and IP2 + port 80 = destination socket on the Google server.

The connection to Yahoo would be:

your PC – IP1+port 60401 ——–Yahoo IP3 +port 80 (standard port) The combination IP1+60401 = the socket on the client computer and IP3 + port 80 = destination socket on the Yahoo server.

Suggested Video

Source: Additional Reading

http://www.steves-internet-guide.com/tcpip-ports-sockets/

www.teachyourselfpython.com