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

[REBOL] Re: retrieving data from TCP port

From: francois:prowse:alcatel at: 23-Oct-2002 12:43

Well, in the end I've used a combination of everything suggested and come up with this. port: open/lines tcp://x.x.x.x:3221 initial: read %initial.xml getconf: read %getconf.txt insert port initial insert port getconf result: copy port portion: copy "" while [portion: copy port] [append result portion] insert port unlock close port either find result "</rpc-send>" [ print "success!!" ][ print "ooh, got an error..." ] note, on this version I've used the /lines extension of the open command. Now in result I have alot of XML .... now what to do with this. If I pass it through parse-xml I get a rebol block, which is fine, however all these "none" entries appear through it Cheers Francois