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

[REBOL] Re: Might as well ask..

From: andy:flyingcat at: 3-Oct-2002 16:33

Hi: Well, without the skip (which I was using to resend part of the file) , the code (which does work) looks like: --------------------- rebol [ "TCP File Client" ] port: open/binary/direct tcp://localhost:5242 outfile: open/binary/direct/write/new %qwe.vts forever [ data: copy/part port 32768 if (none? data) [break] insert outfile data ] print ["file received"] close outfile close port ---------------------------- rebol ["TCP File Server" ] listen: open/binary/direct tcp://:5242 forever [ connection: first listen file: open/binary/read/direct %/usr/video/qwe.vts forever [ data: copy/part file 32768 if( none? data ) [ break ] insert connection data ] print ["file sent"] close connection close file ] close listen ----------------------- The one thing I haven't convinced Rebol to do is let me read a parameter (the filename) from the listen port on the server side before sending the file. Any ideas ? Andy