A logical connecting point is required between a server and a client so that they can communicate through that point, this point is called socket. Each socket is given an identification number called port number. A port number is 2 bytes so it can be 0 to 65,535 i.e., (0 - 2 16 ). Establishing communication between server and client using socket is called socket programming. For each socket there is a port number assigned to it, some pre-allotted port number for the service shown in the below table.
Application of Service | Port Number |
---|---|
FTP (file transfer protocol), which transfers files | 21 |
Telent, which provides remote login | 23 |
SMTP (Simple mail transfer protocol), which delivers mails | 25 |
BOOTP (Bootstrap protocol), which provided configuration at boot time | 67 |
HTTP (Hypertext transfer protocol), which transfers webpages. | 80 |
POP2 (Post office protocol 2), A mailing service | 109 |
POP3 (Post office protocol 3), A mailing service | 110 |
NNTP (Network news transfer protocol), which is for transferring news articles. | 119 |
HTTPS, which transfers web pages Securely. | 443 |
To send data from one computer to another, first of all the computer should be correctly identified on a Network. This is done with the IP addresses. An IP address is a unique identification number given to every computer for Networking purpose. It contains 4 integer number and separated by dot(.), these Integers are from 0 to 255 range. Ex: - 192.168.29.196.
To know the IP address in a website on internet, we can use gethostbyname() function available in socket module.
Silan Software is one of the India's leading provider of offline & online training for Java, Python, AI (Machine Learning, Deep Learning), Data Science, Software Development & many more emerging Technologies.
We provide Academic Training || Industrial Training || Corporate Training || Internship || Java || Python || AI using Python || Data Science etc