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

[REBOL] retrieving data from TCP port

From: francois::prowse::alcatel::co::nz at: 22-Oct-2002 10:29

Hi all, Just wondering if anyone can help me with the following...I'm sending some xml statements directly to a known TCP port as follows... port: open tcp://x.x.x.x:3221 I load some xml in... initial: read %initial.xml then send it to the open port (While capturing the result...I think) result: insert port initial I can see that result: now has some data stored in it from the open port, however the port isn't open long enough to allow capturing all the returned information. So, now my question - how do I do somthing like this... while [result: copy port] [insert port initial] I need this to stay open until either of two (text) results are returned from the remote this (I'm not much of a programmer here:) while result <> "error" or "</rpc-reply>" then insert port initial Hopefully you guys understand all I want to retrive is the returned XML starting with <rpc-reply> and ending with </rpc-reply> (which will either be success or have error returned) and nothing else... I'll leave it at that for the time being :) Any help appreciated Francois