Here is an idea on providing timeouts for socket operations.
1) Add an optional extra parameter to the open() call when "n" is the option,
which would specify the timeout; for example
sock := open("www.google.com:80", "n", 10)
would fail after about 10 seconds on a timeout, in which case &errno would be
set to EINTR - this would allow a timeout to be distinguished from other
causes of failure.
2) Add a timeout parameter to the sysread() call, which does low-level i/o on
a file; for example
str := sysread(sock, 1024, 10)
would specify a timeout of 10 seconds; &errno to be set as before.
3) Add a new function to mirror sysread, syswrite, which would include timeout
functionality :-
syswrite(sock, str, 10)
Any thoughts?
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Unicon-group mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unicon-group