Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Network Ports with no-wait option

 [1/2] from: ptretter:prodigy at: 6-Dec-2000 12:40


Ok I'm stumped (not unusual), I got problems using multiple ports. Here is the delima - I got one port that is open and put into a block. waitports: [myportscheme] This block will be modiflied when information comes in on that port so that the waitports block is updates with new ports as determined by incoming requests. My wait statement looks similiar to: waitport: wait waitports All my ports use the following construction: open/lines/direct/no-wait "whatever port scheme" The problem is how do I read determine when a port that was opened is now closed on the other end. The docs say to copy first port and filter for the "none" response in order to close the port. However, this doesnt seem to be the case. Is this a bug or is there a better way to do this. Additionally, when I do: probe waitports .... If I probe the ports I only see the 'myportscheme of the first port the other never appear however the make object syntax does appear for the additional ports. Also if I write the port information to file I get myportscheme?port?port? Anyone got any ideas? I'm not sure if this is a bug or something still "unfinished" I'm using the latest /view experiemental for this. Paul Tretter

 [2/2] from: holger::rebol::com at: 6-Dec-2000 17:23


On Wed, Dec 06, 2000 at 12:40:41PM -0600, Paul E Tretter wrote:
> Ok I'm stumped (not unusual), I got problems using multiple ports. > Here is the delima - I got one port that is open and put into a block.
<<quoted lines omitted: 4>>
> open/lines/direct/no-wait "whatever port scheme" > The problem is how do I read determine when a port that was opened is now closed on the other end. The docs say to copy first port and filter for the "none" response in order to close the port.
Read data from the port with data: copy port If data is none then the other end has been closed. Otherwise you get the available data. For /lines ports, data is always returned as a block of lines. If no data is available at the port (but the other end has not been closed yet), then an empty block is returned. -- Holger Kruse [holger--rebol--com]

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted