The MASM Forum Archive 2004 to 2012

General Forums => The Laboratory => Topic started by: Ar-ras on April 07, 2006, 02:27:05 AM

Title: Send and recieve files per winsock
Post by: Ar-ras on April 07, 2006, 02:27:05 AM
i am writing a ftp server, but i don't know how to send and recieve a file
Title: Re: Send and recieve files per winsock
Post by: PBrennick on April 07, 2006, 05:35:59 AM
There is a program that does that on Iczelion's website.  I have been told it is not that great but I use it all the time and never have any problems with it.  At least it will give you direction.

Paul
Title: Re: Send and recieve files per winsock
Post by: Tedd on April 07, 2006, 10:45:49 AM
You don't know how FTP should send/receive files?
http://www.ietf.org/rfc/rfc0959.txt will give you more information than you can swallow, regarding how FTP works.

Or you don't know how to get your program to send/receive data (which is files in this case)?
Then I think you might want to experiment with something a little simpler first - a little program to send and receive text. Not wanting to stamp out your enthusiasm, but there are a few things you need to understand first, and making it simpler makes it easier to grasp. Plus, there will be more in the way of examples/help for this. Once you understand how to send text, files/data/anything is actually exactly the same.
Title: Re: Send and recieve files per winsock
Post by: Ar-ras on April 07, 2006, 08:37:40 PM
To send and recieve text is no problem

Does Winsock has an own function to send and recieve files or must i open the files and send it in "raw" method?
Title: Re: Send and recieve files per winsock
Post by: Tedd on April 10, 2006, 10:38:57 AM
Winsock itself doesn't really provide such support.
But you're in luck.. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/wininet_functions.asp
Look for the functions named "ftp....." :toothy
Title: Re: Send and recieve files per winsock
Post by: Ar-ras on April 13, 2006, 11:26:02 PM
Okay I try

Another problem...
How can I make multiple connection?


I use sparcz telnet server to write the ftp server

thx Ar-ras
Title: Re: Send and recieve files per winsock
Post by: Tedd on April 14, 2006, 10:50:42 AM
Multiple connections:
- create connection 1
- create connection 2
- create connection 3
- ......
:lol

(They're all separate connections - that's how you do it.)