| [reply] [Watch: Dir/Any] |
No, if you look in the reply to DaveH above, you will see that I tried the sysread, syswrite, can_read, and can_write without success. The syswrite and can_write acted as if the connection was still up. It was on or before the write that I really needed notification of the dropped connection.
The can_read showed no signs of failure, but the sysread did fail. I have modified my script to use this failure to clear the socket and try to reconnect. This works fine for the current interface, but won't be good enough when I get to a vendor that doesn't send acknowledgements back. I still believe there should be some way of checking the connection without performing a read. I just haven't found it yet.
That's why I say I'm still looking and would be thankful if anyone knows the answer.
| [reply] [Watch: Dir/Any] |
Let us know what you find. (If you find a way). One thing you may not have investigated, which is still on my list of "unknown territory worthy of investigation); is to look at the filedescriptors associated witht the socket. I wonder if you identified which filedescriptor is handling the socket data, then somehow test it for ( who knows what ?) to see if it's connected?. Maybe the POSIX module may have some clues for you? The reason I mention it, is I was experimenting with a server, trying to restart it, without re-execing it, and there was some stale filedescriptors which needed closing manually with POSIX, before I could accept connections. It's pretty complex, with modules involved, but there is some control available to you way down at the "c-code' level.
You can see what filedescriptors are open for the socket, with the "socklist" command.
Just a brainstorm.
I'm not really a human, but I play one on earth.
flash japh
| [reply] [Watch: Dir/Any] |