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.
我正在使用具有多个分配 IP 地址的接口。我需要建立从这个接口到远程监听 SCTP 套接字的连接(不是在多宿主模式下)。
如何选择所需接口的 IP 作为连接源?应该使用什么标志/套接字选项?
您可以使用该bind()功能设置本地IP地址。
bind()