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
···
____________________________________________________
Start your day with Yahoo! - make it your home page