TCP simultaneous open and self connect prevention

后端 未结 9 847
长情又很酷
长情又很酷 2020-12-08 11:54

TCP standard has \"simultaneous open\" feature.

The implication of the feature, client trying to connect to local port, when the port is from ephemeral range, can o

9条回答
  •  没有蜡笔的小新
    2020-12-08 12:34

    Bind the client socket to port 0 (system assigns), check the system assigned port, if it matches the local server port you already know the server is down and and can skip connect().

提交回复
热议问题