[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Socket Communication
- Date: Thu, 13 Sep 2007 08:45:00 +0000
- From: frank.ueberschar at dsa-volgmann.de (frank.ueberschar at dsa-volgmann.de)
- Subject: Socket Communication
-------- 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