ftp upload using PORT mode
Hi,
I'm working on a project where we need to use a ftp client for downloads and uploads. We formerly used a project downloaded from the internet, FtpFactory. This programm only supports passive mode.
We need to use PORT mode now. All goes well for downloading a file from the server. I use a socket that listens to the port I specified and when data is received it triggers a specific method:
socket.BeginAccept(new AsyncCallback(this.AcceptCallback), listensocket);
private void AcceptCallback(IAsyncResult ar)
{ .. start processing incoming data... }
However I also need to be able to upload files. I just can't get the better of this problem. Can someone help me on this one. The socket I'm listening on is not connected, so I cant use it for uploading (sending).
Thanks in advance,
Roeland
Roeland
|