22 Mar
2011
22 Mar
'11
10:56 a.m.
I don't use async call, so in the client I have 2 thread,1 for read and one for write...both inside an infinite loop...
Well, the primary question in this situation is why you use asio? The main asio advantage is proactor-oriented design, which allows you make simple and scalable application, without locking and explicit multithreading. If the whole design of your application is around multithreading and sync. i/o, and it's not supposed to be portable -- I'm afraid you'd be better off with simple plain sockets.
Ok I catch the EOF error...and after?I have to call close, shutdown..?
Yes, you can close() the socket on your side, or just destroy it - depending on the design of your program.