
29 Sep
2008
29 Sep
'08
4:17 a.m.
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