What is the difference between a port and a socket?

后端 未结 30 2131
旧巷少年郎
旧巷少年郎 2020-11-22 14:31

This was a question raised by one of the software engineers in my organisation. I\'m interested in the broadest definition.

30条回答
  •  我在风中等你
    2020-11-22 15:16

    from Oracle Java Tutorial:

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

提交回复
热议问题