Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::asio close TCP connection cleany
From: Igor R (boost.lists_at_[hidden])
Date: 2011-03-22 06:56:24


> 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.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net