April 19, 2024, 09:56:24 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


A tiny FTP server

Started by sapero, December 22, 2010, 01:57:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sapero

December 22, 2010, 01:57:34 AM Last Edit: December 22, 2010, 02:59:33 AM by sapero
This is a tiny ftp server project, it uses overlapped sockets and asynchronous procedure calls (APC).
The current version depends on ConnectEx function which is available on Windows XP, but I'll add later a wrapped with connect+select.

Each connected client is running in separate thread. Each user account has associated Read/Write/Delete permissions, home directory and default code page (ansi/utf-8).

The server can handle the folowing commands: ABOR,APPE,CDUP,CWD,DELE,FEAT,LIST,MKD,NLST,NOOP,OPTS,PASS,PASV, PORT,PWD,QUIT,REIN,RETR,RMD,RNFR,RNTO,SIZE,STOR,SYST,TYPE,USER.

The TYPE command accepts only valid types, but does not apply the type in other data transfers.
The LIST command strips out all dashed parameters. "LIST -a" is treated like "LIST".
The GUI is very limited, not finished, you can only read informations from it.

APC is used in fogprintf function, to add a string to log window. It can be called from multiple threads.

User list is created in main module ftpserv.eba, in LoadUsersList function.
Please tell me if you get any problems compiling it, because I have included some updated headers in the attachment.

Have fun!