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

[REBOL] How do I? Know when a tcp port is empty?

From: al::bri::xtra::co::nz at: 24-Oct-2000 22:58

How do I? Know when a _tcp_ port is empty? Here's a section of my code loosely copied and combined from the Rebol WebServer and Langreiter's vanillean Listen: port! Connection: port! Stop: false set 'Web-Server function [ Port [integer!] Web [file!] ][ Request Filename Data ][ Listen: open/lines join tcp://: Port while [not Stop] [ Connection: first wait Listen Request: make string! 1024 repend Request [first Connection newline] while [not 1 = length? Connection/state/inBuffer] [ ; the above line disturbs me seriously... repend Request [first Connection newline] ] print Request Using lines such as: empty? Connection seems to lead to infinite loops. Can some one point me in the right direction please? Thanks! PS In case you're interested, this project (Spider) is a Wiki and Sparrow in one, along with remote updating of web pages on sites without CGI access. The ultimate Web Dialect! Andrew Martin ICQ: 26227169