What is the difference between a port and a socket?

后端 未结 30 2012
旧巷少年郎
旧巷少年郎 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:02

    Short brief answer.

    A port can be described as an internal address within a host that identifies a program or process.

    A socket can be described as a programming interface allowing a program to communicate with other programs or processes, on the internet, or locally.

提交回复
热议问题