使用凭据进行 ruby​​ 套接字编程

发布于 2024-08-29 07:27:25 字数 182 浏览 5 评论 0原文

大家好,

我正在尝试使用 ruby​​ 套接字连接 TcpSocket 建立与远程服务器的连接。

我从 TcpSocket.new(port,host) 开始,

现在,如何将凭据传递给它。

远程服务器需要凭据才能允许我进行连接。

非常感谢任何帮助。

谢谢

HI folks,

I'm trying to establish connection to a remote server using ruby socket connection TcpSocket.

I started with TcpSocket.new(port,host)

Now, How do I pass the credentials to it.

The remote server needs credentials to allow me to connect.

Any help is very much appreciated.

Thanks

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

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

发布评论

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

评论(1

沧笙踏歌 2024-09-05 07:27:25

您必须说明您尝试使用的端口和第 7 层协议。 TCP 套接字本身不需要任何身份验证。也许您正在尝试建立第 7 层协议连接(ftp、http、pop3),然后您将需要凭据。如果您指定要尝试连接的端口,也许会更容易帮助您

you must say with port and layer 7 protocol you are trying to use. A TCP socket itself don't n need any authentication. Probably you are trying to establish a layer 7 protocol connection (ftp, http, pop3) and then you will need a credential. If you specifiy in which port you are trying to connect maybe would be easier to help you

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