please, I mean dear god I''m just lost. If anything I can just use VB for it, but then I''d haveto run my prog through like a VB front end, I''d rather have it part of the prog.
Read this:http://www.wu-ftpd.org/rfc/rfc0959.txt
It is the rfc for the File Transfer Protocol. You don''t have to worry about EBCIDIC or structured files since nobody actually supports it.
You need two sockets, the control socket and the data socket. You will need the following functions:
Connect - connects the control socket to the Ftp server on port 21.
WriteToControl - sends strings down the control socket. this is needed to send ftp commands.
ReadFromControl - read strings from the control socket.
Port - sends the port command to the control socket and opens up the data socket on the specified port.
SendFile - uploads a file to the server.
GetFile - gets a file from the server.
Close - ends your ftp session.
Remember to use TCP packets. Hope this gives you a good start.
It is the rfc for the File Transfer Protocol. You don''t have to worry about EBCIDIC or structured files since nobody actually supports it.
You need two sockets, the control socket and the data socket. You will need the following functions:
Connect - connects the control socket to the Ftp server on port 21.
WriteToControl - sends strings down the control socket. this is needed to send ftp commands.
ReadFromControl - read strings from the control socket.
Port - sends the port command to the control socket and opens up the data socket on the specified port.
SendFile - uploads a file to the server.
GetFile - gets a file from the server.
Close - ends your ftp session.
Remember to use TCP packets. Hope this gives you a good start.
quote:Original post by Anonymous Poster
Actually a socket is a file descriptor. In Unix they''re represented by ints, but Winsock typedefs an unsigned int to give you a socket. Thats why sockets use file read/write operations (same goes for unix pipes).
I know, that''s why I said it In windows, you can even use the WriteFile() and ReadFile() functions to send/receive on a socket. That''s how things like I/O completion ports work with sockets - it basically assumes it''s a file and you can do asynchronous I/O on it.
codeka.com - Just click it.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement