Sending and receiving UDP packets between two programs on the same computer

后端 未结 8 1817
慢半拍i
慢半拍i 2020-12-02 12:37

Is it possible to get two separate programs to communicate on the same computer (one-way only) over UDP through localhost/127... by sharing the same port #?

We\'re

8条回答
  •  猫巷女王i
    2020-12-02 13:15

    Only one program can bind to a port at a time. Multiple programs can connect to one port on another system's, but the local port your different web browsers have bound themselves to is randomly assigned.

    Unless you want to do some ugly inter-process communication or packet sniffing, there's no way to have multiple programs bound to one port.

提交回复
热议问题