Clint Jeffery wrote:

Has use of the "nl" file mode been documented anywhere (besides in the source code)?



Art,


The "nl" mode is bleeding-edge new, it is in CVS and has seen preliminary
testing.  I plan to add a description of it to Chapter 5 of the Unicon book
as soon as I can.  In the meantime, I can offer the following:

f := open(":"||port, "nl")

returns immediately, instead of blocking as mode "na" does.

This is very close to something I've been looking for!

f is not open for reading or writing yet, it is just listening.
If f is passed into a select():

L := select([f])

then a connection request on f's port will cause f to turn into a
regular network connection (open for reading and writing, per "na")

I need to be able to open a connection to write without blocking. I want to be able to query several web sites concurently. Will this do the trick or is more needed?

and f will be in the list L that is returned from select().

This allows select() to handle input on existing connections while
also listening for new connections.

I'll be able to handle the first one to open and deal with possible timeouts.


Clint




David



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
Unicon-group mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to