Socket Communication
frank.ueberschar at dsa-volgmann.de
frank.ueberschar at dsa-volgmann.de
Thu Sep 13 08:45:00 UTC 2007
-------- Original Message --------
From: Sergei Organov <osv at javad.com>
> You should not close the socket asynchronously. Use shutdown() instead
> of close(). You then will need some logic that ensures close() is called
> after both threads leave blocking calls and only once. Usually one
> closes socket in the same thread that has created it.
Seems as if I got this working, thanks a lot.
FYI, the "timeout thread" i.e. will shutdown() the socket.
Then my receive and send thread will unblock -- but the receive
thread will wait for the send thread being finished before
closing the socket once. No other thread is calling close().
I dont want the "accept thread" to do this as it will keep
blocking itself on accepting connections.
regards, frank
>
> -- Sergei.
To: osv at javad.com
rtems-users at rtems.com
More information about the users
mailing list