![]() It is the socket pair (the 4-tuple consisting of the client IP address, client port number, server IP address, and server port number) that specifies the two endpoints that uniquely identifies each TCP connection in an internet.In particular, firewalls are commonly configured to differentiate between packets based on their source or destination port numbers as in port forwarding. The port numbers are encoded in the transport protocol packet header, and they can be readily interpreted not only by the sending and receiving computers, but also by other components of the networking infrastructure.The purpose of ports is to differentiate multiple endpoints on a given network address.A TCP connection is defined by two endpoints aka sockets.A TCP socket is not a connection, it is the endpoint of a specific connection.Well, we make a call to the socket() system routine.Īfter the socket() returns the socket descriptor, we start communicate through it using the specialized send()/recv() socket API calls. Where do we get the file descriptor for network communication?.Socket is a way of speaking to other programs using standard file descriptors.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |