Is there an existing project to build a tcp util library? I mean one that will do the following:
int tcp_connect(host, port); int tcp_connect_async(host, port, connect_callback, status_update_callback, callback_data); void tcp_connect_async_cancel(int id);
int tcp_readline(fd, buff, maxlen); int tcp_writeline(fd, buff, nbytes);
etc.
I ask because if there isn't one already, I'd like to release ayttm's tcp library as a separate project that would be of use to others.
I would also like to look at a separate library that does asynchronous dns lookups.
It is important that none of these libraries use multiple threads, or any extra toolkit. It will have to be in vanilla C or C++.
Philip