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

[REBOL] UPD Logging Server

From: rsnell::webtrends::com at: 12-Dec-2000 10:30

I have been using a TCP logging server for some stuff here at work for a couple of months now. Works fine with the latest Core experimental. It just waits for line data from a client and displays it when received (code below). Now I want to change to UDP instead of TCP. Unfortunately it doesn't appear to be just a simple change of protocol since I'm getting error messages when trying to use first and pick on the port. And more unfortunately, there is little UDP documentation from RT (at least that I can find). Here is the TCP version - what do I need to do for a UDP version? REBOL [] sp: open/lines/no-wait/with tcp://:5599 form newline forever [ cp: first wait sp d: "none" forever [ w: wait [cp .1] if all [port? w none? d][ ;connection closed - wait for a new one and continue cp: first wait sp d: "none" ] if port? w [ print d: pick cp 1 ] ] ] Thanks, Rodney