PDA

View Full Version : AlexFTP and WS_FTP LE


dgavenda
05-02-2001, 11:09 AM
My brother and I are using AlexFtp and WS_FTP LE to transfer files from each of our computers. The problem is after a couple of transfers, when trying to transfer files it reports an error of not be able to create a socket. If the user of AlexFtp exits AlexFtp and restarts it, it works fine again for a couple of transfers then the error. Any ideas what the problem could be?

Doesn't FTP need 2 connections --one for data transfer and one for the control? Sometimes when we connect we have 1 connection and other times 2. Also, when we are transferring a file, it increases the connections by 1. I assume this is because a "child" connection is created to handle the transfer. Is this true??

Ghost_Hacker
05-03-2001, 09:56 AM
Yes, there are 2 connections when using FTP file transferring. Port 21 for commands and port 20 for data. The command connection is always open, the data connection doesn't need to be. (that's why you sometimes only see one connection or socket) These are the defaults and all FTP programs must support them. They don't however have to use the default data port. (it can be changed using the "PORT" and "PASV" commands)

Once a file is finished transfering the data connection won't be closed till after a time out period. ( this is done for reliable communications) Therefore the FTP program will open a new port if your transfering more than one file during a session. . ( This is why you see the data connections going up by 1 each time you transfer a file.) The increase must be negotiated between the two FTP programs. If they can't reach an agreement on the next port to use. The error your getting would be displayed. Rebooting the program would close all open sockets and reset the program.

If this is causing a problem for you. You may need to look to see if this is an issue with the FTP programs your using and if a patch is avaiable. Or if you have any type of firewall between you and the other "client".


Good Luck http://www.PCGuide.com/ubb/smile.gif


------------------
Comment heard from a Klingon programmer.

"Klingon function calls do not have 'parameters'. They have 'arguments'....and they ALWAYS WIN THEM!"



[This message has been edited by Ghost_Hacker (edited 05-03-2001).]