开发者

Ruby Gserver terminates session when initiating new class

开发者 https://www.devze.com 2023-03-12 03:57 出处:网络
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

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消