osv at javad.com
Tue Sep 11 17:04:04 UTC 2007
frank.ueberschar at dsa-volgmann.de writes:
> To whom it may concern,
> I have a small answer regarding TCP/IP sockets in
> an older Version of RTEMS (4.5.1). Even if that version
> was timed-out for many users...
> We are always using a task pair for Socket Communication.
> One for the receiver one for the sender in blocking mode.
> Both are using the same socket.
> My Problem appears when closing this socket on error or if the
> destintation system broke down without closing the TCP connection.
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.
More information about the users