Boost logo

Boost Users :

Subject: Re: [Boost-users] [ASIO] Send data on a socket
From: michi7x7 (michi_at_[hidden])
Date: 2011-08-12 10:06:40


Hi,

> My process uses two threads, a parent thread and a child thread.
>
> The parent thread make a socket server and when a connection request
> arrives, it creates the child thread which uses this socket to communicate
> with the client.
>
> My intention was to send commands from the parent thread to child (for its
> termination) using the this socket...
>
> (I use the C++2011 thread that not allow the thread killing)
>

Just close the socket from the parent thread, client-thread operations
on this socket will fail and throw. You can just terminate the thread if
such an error occurs.

HTH

michi7x7


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