What is the difference between a port and a socket?

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

    A single port can have one or more sockets connected with different external IP's like a multiple electrical outlet.

      TCP    192.168.100.2:9001     155.94.246.179:39255   ESTABLISHED     1312
      TCP    192.168.100.2:9001     171.25.193.9:61832     ESTABLISHED     1312
      TCP    192.168.100.2:9001     178.62.199.226:37912   ESTABLISHED     1312
      TCP    192.168.100.2:9001     188.193.64.150:40900   ESTABLISHED     1312
      TCP    192.168.100.2:9001     198.23.194.149:43970   ESTABLISHED     1312
      TCP    192.168.100.2:9001     198.49.73.11:38842     ESTABLISHED     1312
    

提交回复
热议问题