[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
detecting broken sockets
From: |
Alex Pavloff |
Subject: |
detecting broken sockets |
Date: |
Wed, 18 Sep 2002 15:26:36 -0700 |
Hello folks,
I've been using the UnixSocket class (which I wrote), and I'm trying to
figure out how to handle a certain situation. I want to test to see if the
socket is broken in anyway, and if so, attempt a reconnect. I'm using
UnixStream (like TCPStream), so the good() call just checks the failbits to
see if an error *did* occur.
So whats the best way to do this? Is there a std::stringbuf or some std
function that I can use? Is there some ost::Socket function I can call?
(Doubt it, since the UnixSocket fits sort of strangely on top of Socket).
Or do I write a test function and add it directly to UnixSocket?
Thanks,
Alex Pavloff - address@hidden
Eason Technology -- www.eason.com
- detecting broken sockets,
Alex Pavloff <=