FXRuby addInput on telnet connection.

Discussion in 'Ruby' started by Guest, Aug 28, 2005.

  1. Guest

    Guest Guest

    In the program I'm working on, I'd like to use
    addInput to set up a method that will be activated
    when there's data available to be read on the socket.

    Since I wasn't sure which mode to use, I started with
    this, to test both...

    (conn being the open telnet connection)

    @app.addInput(conn.sock, INPUT_READ) {
    puts "read"
    }
    @app.addInput(conn.sock, INPUT_WRITE) {
    puts "write"
    }

    ... And, as it turned out, neither would react when
    the connection received data.

    I assumed that since addInput didn't cause it to crash
    (as it did when I used "conn" instead of "conn.sock")
    that this can work with sockets, but I would have
    expected one of those to get a response in that case.

    Am I just doing something wrong, or do I need to use
    some other command to accomplish this?

    -Morgan


    =09
    ____________________________________________________
    Start your day with Yahoo! - make it your home page=20
    http://www.yahoo.com/r/hs=20
    =20
    Guest, Aug 28, 2005
    #1
    1. Advertising

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. Kevin Hsu

    mud(telnet) connection using Java

    Kevin Hsu, Apr 11, 2004, in forum: Java
    Replies:
    3
    Views:
    2,427
    steve
    Apr 15, 2004
  2. Jim Isaacson
    Replies:
    5
    Views:
    593
    Default User
    Nov 5, 2004
  3. anderson
    Replies:
    2
    Views:
    85
    anderson
    Oct 17, 2003
  4. Carcarius
    Replies:
    0
    Views:
    279
    Carcarius
    Dec 6, 2007
  5. Lyle Johnson
    Replies:
    0
    Views:
    125
    Lyle Johnson
    May 20, 2008
Loading...

Share This Page