Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以使用一个流套接字来接受入站连接并启动出站连接。这个概念是因为我想使用同时打开的套接字通过 TCP 进行 NAT 遍历。
I don't understand what do you mean by one stream socket, do you mean some stream sockets on one address? if this is true in TCP you can use setsockopt to set SO_REUSEADDR to 1 and then multiple sockets can share same address
setsockopt
SO_REUSEADDR
1