Can TCP and UDP sockets use the same port?

前端 未结 2 878
自闭症患者
自闭症患者 2020-11-28 03:59

First of all, is there any problem with using both UDP and TCP on the same server?

Secondly, can I use the same port number?

2条回答
  •  庸人自扰
    2020-11-28 04:25

    Firstly,there is no problem using both tcp and udp on the server.

    Secondly,we can have both UDP and TCP requests on same port ,because each request is identified by a quintuple contained by source IP ,Destination IP, Source Port, Destination Port, PROTOCOL(as protocol can be TCP or UDP).

提交回复
热议问题