I have used the Boost library to create a TCP class with async functions, similar to the samples provided by Boost. When I read/write to the TCP port, is it necessary to always establish a connection using some asynchronous connect function. Is it possible to Connect once, and then do multiple read/write without closing the tcp socket, at different points of time? (I am aware of the nested calls made between an async read & it's handler to make a continuous read operation.) My intention is to write a Connect function that opens a TCP connection. Then at some later point of time, I will call a Read function to read from the tcp port, from different functions of my program. Is that possible?? Any code samples would be helpful.
Aucun commentaire:
Enregistrer un commentaire