jayapalchandran
April 3rd, 2008, 01:08 AM
i am trying to connect to my ftp server using sockets...
i want to send a file every time i modify... the program is incomplete...
it is working... but i am not clear of how to keep the connection live...
i am sending the commands to port 21
out ="USER username\r\n";
out += "PASS pass\r\n";
out+= "ACCT ftp.domain.com\r\n"
out+= "LIST\r\n";
out += "CDUP\r\n";
iResult = send( ConnectSocket, out.c_str(), out.length(), 0 );
the result is - the word username will have the login name
220---------- Welcome to Pure-FTPd [TLS] ----------
220-You are user number 5 of 50 allowed.
220-Local time is now 00:57. Server port: 21.
220-This is a private system - No anonymous login
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
331 User username OK. Password required
230-User username has group access to: username
230 OK. Current restricted directory is /
202 Please tell me who you are
425 No data connection
250 OK. Current directory is /
250 Logout.
if i have to send a file then how it should suppose to be ?
that is what is the rule to construct the ftp command for that...
__________________
i want to send a file every time i modify... the program is incomplete...
it is working... but i am not clear of how to keep the connection live...
i am sending the commands to port 21
out ="USER username\r\n";
out += "PASS pass\r\n";
out+= "ACCT ftp.domain.com\r\n"
out+= "LIST\r\n";
out += "CDUP\r\n";
iResult = send( ConnectSocket, out.c_str(), out.length(), 0 );
the result is - the word username will have the login name
220---------- Welcome to Pure-FTPd [TLS] ----------
220-You are user number 5 of 50 allowed.
220-Local time is now 00:57. Server port: 21.
220-This is a private system - No anonymous login
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
331 User username OK. Password required
230-User username has group access to: username
230 OK. Current restricted directory is /
202 Please tell me who you are
425 No data connection
250 OK. Current directory is /
250 Logout.
if i have to send a file then how it should suppose to be ?
that is what is the rule to construct the ftp command for that...
__________________