On Thursday 24 June 2004 01:32, Shamim Mohamed wrote:

> >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.
>
> Anything beyond what select() already does?
>     L := select(sock, 10)
>     if *L  > 0 then
>         str := sysread(sock, 1024)
>
> >3) Add a new function to mirror sysread, syswrite, which would include
> > timeout functionality :-
> >   syswrite(sock, str, 10)
>
> What would you use syswrite for? (A file can be put into non-blocking
> mode with fcntl.)
>

I agree that using select() for the reading is better, but it would be nice to 
be able to use select() for writes too... how about adding a new function for 
that, say selectw()?



-------------------------------------------------------
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

Reply via email to