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 Brown

    Guest

    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

    Ari Brown 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


    --
    Posted via http://www.ruby-forum.com/.
     
    , Nov 1, 2007
    #2
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Carpe Diem
    Replies:
    3
    Views:
    7,643
    Carpe Diem
    Feb 23, 2004
  2. John J Lee
    Replies:
    3
    Views:
    814
    bruno at modulix
    Dec 1, 2005
  3. Andrew
    Replies:
    0
    Views:
    752
    Andrew
    Apr 5, 2007
  4. Edward Loper

    mmm-mode, python-mode and doctest-mode?

    Edward Loper, Aug 9, 2007, in forum: Python
    Replies:
    0
    Views:
    653
    Edward Loper
    Aug 9, 2007
  5. Brice Rebsamen

    termios and keyboard medium raw mode

    Brice Rebsamen, Mar 13, 2008, in forum: C Programming
    Replies:
    2
    Views:
    3,134
    Mark Bluemel
    Mar 13, 2008
  6. gaurav kashyap
    Replies:
    3
    Views:
    7,145
    Paul Boddie
    Oct 31, 2008
  7. Andreas Leitgeb
    Replies:
    2
    Views:
    961
    Arne Vajhøj
    Aug 10, 2010
  8. Steve
    Replies:
    2
    Views:
    1,117
    edicionsdigitals.com edicions digitals xarxa socia
    Dec 7, 2010
Loading...