Hi Jeff, thanks, I am going to dive into Boost::Asio myself, soon, and will come back to your example then :-) Just wondering (while being aware, that this is not a fully fledged telnet client): I tried to connect to localhost, port 23. There is no service running, so I would have expected the program to terminate (it terminates when I specify a host which does not exist). I even sent 800MB of XML data into the program. It did not complain and wrote it to Nirvana, I guess :-) Regards, Roland Jeff Gray wrote:
I've been teaching myself how to use the asynchronous I/O capabilities in Boost asio. I took the chat client example code that came with Boost and modified it to act as a more general telnet client.
Hopefully, this may be of use to others trying to get to grips with the basics of this way of working. More experienced developers can feel free to suggest better ways of doing things here.
This is just a demonstration - it does not do all the niceties of a full application, but hopefully covers the basics.
I wrote this for a Linux system, but the only system specific thing is the code that enables single keypress input for cin.get(). I'm sure you can easily find alternatives for your system to achieve the same result.
Enjoy, Jeff
------------------------------------------------------------------------
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users