Terminal Session Raw Mode

Discussion in 'Ruby' started by Ari Brown, Jul 30, 2007.

  1. Ari Brown

    Ari Brown Guest

    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
     
    Ari Brown, Jul 30, 2007
    #1
    1. Advertisements

  2. 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

    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
     
    dave.skidmore, Nov 1, 2007
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.