# Terminal Session Raw Mode

**URL:** <https://www.ruby-forum.com/t/terminal-session-raw-mode/110715>\
**Category:** Ruby\
**Created:** [July 30, 2007, 4:48am UTC](https://www.ruby-forum.com/t/terminal-session-raw-mode/110715 "2007-07-30T04:48:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ari\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a698b9/32.png) [@Ari\_B](https://www.ruby-forum.com/u/Ari_B)\
**Post date:** [July 30, 2007, 4:48am UTC](https://www.ruby-forum.com/t/terminal-session-raw-mode/110715/1 "2007-07-30T04:48:05Z")

</div>

Hey all

I’m using GServer to run a little ruby app (ie a MUD, from scratch,  
no less!), and I am using IO.getc(), like in JEG2’s #45 MUD example.  
However, as this is being run as a server, I don’t have control over  
a client’s computer. So how can I set that terminal session to raw  
mode? Is it even possible?

Thanks,  
-------------------------------------------------------|  
~ Ari  
crap my sig won’t fit

---

<div class="post-metadata">

**Author:** ![Ari\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a698b9/32.png) [@Ari\_B](https://www.ruby-forum.com/u/Ari_B)\
**Post date:** [November 1, 2007, 3:50pm UTC](https://www.ruby-forum.com/t/terminal-session-raw-mode/110715/2 "2007-11-01T15:50:22Z")

</div>

Ari,

I’ve done something similar, so far just constructed a simple  
chatserver. I use IO#gets(); but the thing that helped me with client  
stuff is an answer to one of the rubyquiz quizes, specifically this one:  
[http://www.rubyquiz.com/quiz32.html](http://www.rubyquiz.com/quiz32.html)

The handle\_telnet function there fixed all the issues I had. I  
previously was using PuTTY to connect, and specifying a raw connection.  
Trying to use the telnet mode, or Windows Telnet, had wacky echo and  
linefeed issues. I added that function to my GServer child, and wrapped  
my call to io.gets() in it, and now both PuTTY Telnet mode and windows  
telnet connect and act perfectly. It’s beautiful.

Thank you, Mr. Gray!

Dave

Ari B. wrote:

> Hey all
> 
> I’m using GServer to run a little ruby app (ie a MUD, from scratch,  
> no less!), and I am using IO.getc(), like in JEG2’s #45 MUD example.  
> However, as this is being run as a server, I don’t have control over  
> a client’s computer. So how can I set that terminal session to raw  
> mode? Is it even possible?
> 
> Thanks,  
> -------------------------------------------------------|  
> ~ Ari  
> crap my sig won’t fit
