Ruby Gserver 在启动新类时终止会话
我用 ruby 构建了一个小型文本冒险游戏。这是一个类,我使用输入文本启动该类,并将输出打印到我的终端窗口。我想为这一切制作一个 telnet 包装器,所以我找到了 Gserver,并构建了它,以便您可以发送命令,并使用输入制作一个新游戏。但是,当调用该命令时,它会删除 telnet 会话,并显示“连接已被外部主机关闭”。
不太确定这里出了什么问题。我希望有人能帮助我。和超时有什么关系吗?最好是简单的;)
提前致谢。 ——帕特里克·盖茨
I built a little text-adventure game in ruby. It's a class and I initiate the class with the input text, and it prints the output to my terminal window. I wanted to make a telnet wrapper for this all, so I found Gserver, and built it so that you can send a command, and a makes a new game with the input. However, when it gets to calling the command, it drops the telnet session giving me "Connection closed by foreign host."
Not quite sure whats going wrong here. I hope someone can help me out. Does it have anything to do with timeouts? Preferably something easy ;)
Thanks in advance.
-Patrick Gates
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
啊哈!弄清楚吧。我的班级中的一个错误是关闭连接,但由于某种原因它被捕获,所以我特意告诉它捕获所有错误,并且能够解决问题。谢谢大家。
AHA! Figure it out. An error in my class was closing the connection, but for some reason it was being caught, so I specifically told it to catch all errors, and was able to solve the issue. Thanks everyone.