需要 TCP 反向连接方面的帮助

发布于 2024-09-07 22:41:56 字数 180 浏览 3 评论 0原文

我正在为我正在从事的一些项目创建一个身份验证服务器。该身份验证服务器的工作方式是向尝试身份验证的用户接收和传输数据。用户可以成功向服务器发送数据,但发回时需要端口转发。我读到一种方法,我不需要使用反向连接进行端口转发,但我不知道如何让它工作。我找到了一个教程并尝试实现,但是当它尝试连接以读取流时,它说连接被拒绝。

有什么想法吗?

I am creating an authentication server for some projects I'm working on. This authentication server works by receiving and transmitting data to users trying to authenticate. The user can send data to the server succesfully but when sending back it requires port forwarding. I read a way that I would not require port forwarding by using reverse connection but I have no idea how to get it working. I found a tutorial and tried to implement but when it tries to connect to read the stream it says the connection is refused.

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

﹉夏雨初晴づ 2024-09-14 22:41:56

如果用户已经连接到服务器,为什么不保持(现有)连接打开,并将其用于双向通信呢?

我认为没有理由打开从服务器返回客户端的第二个连接。

If the user is already connecting to the server, why not just keep the (existing) connection open, and use that for bidirectional communication?

I can see no reason to open a second connection from the server back to the client.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文