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





-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to