This is a good attempt for version 0.01, but I have a couple of criticisms.
The biggest problem I found is that it's susceptible to negotiation loops. No doubt the loops are more the fault of the Telnet software I'm talking to in my application, but I believe Net::Telnet::Options could be more robust. RFC 1143, "The Q Method of Implementing TELNET Option Negotiation" provides rules and an example state machine for this. The author of the RFC, Daniel J. Bernstein, points out: "... preventing such loops is a nontrivial task." [Page 1]
My second criticism is about separation of concerns. I wanted to use syswrite() in my application, which becomes a system call, but NTO writes to the socket using print(), which becomes a C standard library call. Of course, it's a no-no to mix system and library calls, so I had to use print() in my code too. This is ironic, since the NTO documentation gives an example of using recv(), a system call, to read from the socket. I think it would be better if NTO devolved the writing to a callback and abstracted itself to dealing purely with Telnet options.
1 out of 1 found this review helpful. Was this review helpful to you? Yes No