Re: winsock and FTP app
- From: Paul E Mak <jarod997@xxxxxxxx>
- Date: Mon, 04 Apr 2005 20:10:11 -0400
Ok, so I got some things sorted out, but I'm still having trouble opening the data connection. Here's some more info:
wsCommand .RemotePort = 21 .RemoteHost = xxxxxxx.ca '(This connection works) .LocalPort = 0
wsData .RemotePort = 20 .RemoteHost = xxxxxxx.ca '(Same as wsCommand) .LocalPort = yy
I set yy to the PORT command port number, eg: 192,168,55,111,4,42 is 4 * 256 + 42 = 1066
So I connect, user xxx, pass xxx, port 192,168,55,111,4,42
Everything up to here is ok. What should I be doing in my code after I send the PORT command?
PS Oddly enough I got this much farther by looking in the MS Windows Help files. Shhh, don't tell anyone. ;)
Paul
Paul E Mak wrote:
I'm trying to write an app that will dump the contents of a memory card (whole drive) to a root account on an ftp server. I have a basic ftp program working except for the data connection. Now I don't know how (MS) ftp.exe seems to get my PORT number, (because I'm behind a firewall), but it does and LIST, GET, PUT, etc all work fine. In my app, I can't get LIST, STOR, RETR etc working because I can't get the data connection set up correctly. I'm assuming it's because I don't have the right PORT number. So the question is, how can I get my WAN IP from within VB6, (the LOCALIP just gives me my LAN IP) for the PORT command to use? The alternate question is, am I looking at the wrong thing/what else am I doing wrong?
Paul
.
- References:
- winsock and FTP app
- From: Paul E Mak
- winsock and FTP app
- Prev by Date: iNET works on Dev Machine but not others.
- Next by Date: Activex download from HTTPS
- Previous by thread: winsock and FTP app
- Next by thread: Disable picture loading in webcontrol
- Index(es):
Relevant Pages
|