gpt4 book ai didi

h2 - TCP服务器IP地址

转载 作者:行者123 更新时间:2023-12-04 02:55:39 25 4
gpt4 key购买 nike

当启动 H2 tcp 服务器并且主机 pc 有多个 IP 地址时,我如何定义服务器要绑定(bind)的 IP 以监听连接?我们可以定义 tcp 端口,但似乎没有办法定义 ip 地址。谢谢你,奥斯卡

最佳答案

http://www.h2database.com/html/advanced.html#server_bind_address

Usually server sockets accept connections on any/all local addresses. This may be a problem on multi-homed hosts. To bind only to one address, use the system property h2.bindAddress. This setting is used for both regular server sockets and for SSL server sockets. IPv4 and IPv6 address formats are supported.

关于h2 - TCP服务器IP地址,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8319345/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com