Re: FTP uploading/downloading with callbacks
- Posted by Mario Steele <eumario at trilake.net> Nov 23, 2003
- 567 views
--------------060009060204060808050604 Daniel Kluss wrote: > > >You should use one of the many wrappers for winsockets available on >rapideuphoria.com, I'll speak of mine(The Windows Server "search for kluss") >cause thats the one I'm most familiar with. Almost all of the winsock >wrappers are async(I think) mine is, all you have to do to do ftp is look at >a couple of RFCs(mainly 959) on the internet about it. >It's like this >You=Your client euphoria program >Them=Their FTP server > >You opens a connection socket port 21, with their IP address or DNS name >Them sends "220 Service ready <CRLF>" >You send "USER Doe<CRLF>" >Them send "331 User name ok, need password<CRLF>" >You send "PASS mumble<CRLF>" >Them send "230 User logged in<CRLF>" > >Then Your all connected and you do: > RETR <SP> <pathname> <CRLF> >Tells server to send you file > STOR <SP> <pathname> <CRLF> >Sends server file > PORT <SP> <host-port> <CRLF> >Tells server your port number to connect to > PASV <CRLF> >Asks server connection port for you to connect to > TYPE <SP> <type-code> <CRLF> >Tells server data type > QUIT <CRLF> >Makes server connection close > > >I hope thats easy enough >Daniel Kluss >----- Original Message ----- >From: "A. Hall" <cheetah_heels at myrealbox.com> >To: <EUforum at topica.com> >Sent: Saturday, November 22, 2003 3:30 PM >Subject: FTP uploading/downloading with callbacks > > >>Hi, >> >> A project I'm working on requires the ability to upload and download a >>particular file (a small database) to and from a specific FTP server. >> >> >With > > >>what little I know about network programming concepts, I'm trying to find >> >> >a > > >>way to do this task and receive progress callbacks (for both uploading and >>downloading), so that I can update my progress gauge and perform a >> >> >doEvents > > >>to catch any press of my Cancel button. I've tried Fabio Ramirez' wrapper >>for WinInet.dll and Ray's eulibcurl and euFTP4w. The only one I could get >>to work with progress callbacks is eulibcurl, but only for downloading >> >> >(the > > >>uploading portion of libcurl doesn't seem to be wrapped). EuFTP4w would >> >> >be > > >>great; but since the current wrapper only supports synchronous calls, my >>program must wait for the function to return. Right now, I'm trying to >>understand how to use WinInet.dll with callbacks. Can anyone offer me >> >> >some > > >>advice? >> >>Andrew Hall >> >> >>TOPICA - Start your own email discussion group. FREE! >> >> > > >TOPICA - Start your own email discussion group. FREE! <snip> Oh Dear lord, you mean Mario is here????? RUN FOR THE HILLS! Ummm.... Oh, I mean Hi. I saw your problem, and was faced with the same problem not to long ago, but my problem was with none of the libraries Supporting Proxy (Socks4/Socks5) Properly. I myself just finished writting a sorta.... conformed to the particular program, version of FTP, with full Socks4/Socks5 Support. If you would like some help in getting you started with FTP, I'll be more then glad to help out. Just send me a email (eumario at tuscanchat.com please), and I'll get back to ya. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Mario Steele Tuscan Chat Client (http://www.tuscanchat.com) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -- Mario Steele (EuMario | Enchanted Blade) Euphoria Coder Extrodinare, and Author of Tuscan Chat http://www.tuscanchat.com http://www.portwatchdog.com --------------060009060204060808050604 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> </head> <body> Daniel Kluss wrote:<br> <blockquote type="cite" cite="mid1255458402-1463747838-1069548221 at boing.topica.com"> <pre wrap="">============ The Euphoria Mailing List ============ You should use one of the many wrappers for winsockets available on rapideuphoria.com, I'll speak of mine(The Windows Server "search for kluss") cause thats the one I'm most familiar with. Almost all of the winsock wrappers are async(I think) mine is, all you have to do to do ftp is look at a couple of RFCs(mainly 959) on the internet about it. It's like this You=Your client euphoria program Them=Their FTP server You opens a connection socket port 21, with their IP address or DNS name Them sends "220 Service ready <CRLF>" You send "USER Doe<CRLF>" Them send "331 User name ok, need password<CRLF>" You send "PASS mumble<CRLF>" Them send "230 User logged in<CRLF>" Then Your all connected and you do: RETR <SP> <pathname> <CRLF> Tells server to send you file STOR <SP> <pathname> <CRLF> Sends server file PORT <SP> <host-port> <CRLF> Tells server your port number to connect to PASV <CRLF> Asks server connection port for you to connect to TYPE <SP> <type-code> <CRLF> Tells server data type QUIT <CRLF> Makes server connection close I hope thats easy enough Daniel Kluss ----- Original Message ----- From: "A. Hall" <a class="moz-txt-link-rfc2396E" href="mailto:cheetah_heels at myrealbox.com"><cheetah_heels at myrealbox.com></a> To: <a class="moz-txt-link-rfc2396E" href="mailto:EUforum at topica.com"><EUforum at topica.com></a> Sent: Saturday, November 22, 2003 3:30 PM Subject: FTP uploading/downloading with callbacks </pre> <blockquote type="cite"> <pre wrap=""> Hi, A project I'm working on requires the ability to upload and download a particular file (a small database) to and from a specific FTP server. </pre> </blockquote> <pre wrap=""><!---->With </pre> <blockquote type="cite"> <pre wrap="">what little I know about network programming concepts, I'm trying to find </pre> </blockquote> <pre wrap=""><!---->a </pre> <blockquote type="cite"> <pre wrap="">way to do this task and receive progress callbacks (for both uploading and downloading), so that I can update my progress gauge and perform a </pre> </blockquote> <pre wrap=""><!---->doEvents </pre> <blockquote type="cite"> <pre wrap="">to catch any press of my Cancel button. I've tried Fabio Ramirez' wrapper for WinInet.dll and Ray's eulibcurl and euFTP4w. The only one I could get to work with progress callbacks is eulibcurl, but only for downloading </pre> </blockquote> <pre wrap=""><!---->(the </pre> <blockquote type="cite"> <pre wrap="">uploading portion of libcurl doesn't seem to be wrapped). EuFTP4w would </pre> </blockquote> <pre wrap=""><!---->be </pre> <blockquote type="cite"> <pre wrap="">great; but since the current wrapper only supports synchronous calls, my program must wait for the function to return. Right now, I'm trying to understand how to use WinInet.dll with callbacks. Can anyone offer me </pre> </blockquote> <pre wrap=""><!---->some </pre> <blockquote type="cite"> <pre wrap="">advice? Andrew Hall TOPICA - Start your own email discussion group. FREE! </pre> </blockquote> <pre wrap=""><!----> --^---------------------------------------------------------------- This email was sent to: <a class="moz-txt-link-abbreviated" href="mailto:eumario at trilake.net">eumario at trilake.net</a> EASY UNSUBSCRIBE click here: <a class="moz-txt-link-freetext" href="http://topica.com/u/?b1dd66.b63nIc.ZXVtYXJp">http://topica.com/u/?b1dd66.b63nIc.ZXVtYXJp</a> Or send an email to: <a class="moz-txt-link-abbreviated" href="mailto:EUforum-unsubscribe at topica.com">EUforum-unsubscribe at topica.com</a> TOPICA - Start your own email discussion group. FREE! <a class="moz-txt-link-freetext" href="http://www.topica.com/partner/tag02/create/index2.html">http://www.topica.com/partner/tag02/create/index2.html</a> --^----------------------------------------------------------------</pre> </blockquote> <br> Oh Dear lord, you mean Mario is here????? RUN FOR THE HILLS!<br> <br> Ummm.... Oh, I mean Hi. I saw your problem, and was faced with the same problem not to long ago, but my problem was with none of the libraries Supporting Proxy (Socks4/Socks5) Properly. I myself just finished writting a sorta.... conformed to the particular program, version of FTP, with full Socks4/Socks5 Support. If you would like some help in getting you started with FTP, I'll be more then glad to help out. Just send me a email (<a class="moz-txt-link-abbreviated" href="mailto:eumario at tuscanchat.com">eumario at tuscanchat.com</a> please), and I'll get back to ya.<br> <br> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<br> Mario Steele<br> Tuscan Chat Client (<a class="moz-txt-link-freetext" href="http://www.tuscanchat.com">http://www.tuscanchat.com</a>)<br> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<br> <pre class="moz-signature" cols="$mailwrapcol">-- Mario Steele (EuMario | Enchanted Blade) Euphoria Coder Extrodinare, and Author of Tuscan Chat <a class="moz-txt-link-freetext" href="http://www.tuscanchat.com">http://www.tuscanchat.com</a> <a class="moz-txt-link-freetext" href="http://www.portwatchdog.com">http://www.portwatchdog.com</a></pre> <br> --------------060009060204060808050604--