Quick Search for:  in language:    
FTP,FIXED,simple,server,developed,using,Winso
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
Visual Basic Stats

 Code: 3,014,970. lines
 Jobs: 119. postings

 How to support the site

 
Sponsored by:

 

You are in:

 
Login



Latest Code Ticker for Visual Basic.
Click here to see a screenshot of this code!MSChart Simple Example
By Sebastian Pereira on 7/2

(Screen Shot)

CString v1.5
By Ultimatum on 7/2


Tablature Pro
By Michael McMullen on 7/2


Click here to see a screenshot of this code!MSN Password Decryptor
By Muhammad Sufyan Ansari on 7/2

(Screen Shot)

Mp3 Paker
By Michael McMullen on 7/2


Suppress Run Time Script Errors
By Nuclear_1000G on 7/2


Click here to see a screenshot of this code!List Maker
By KBM-00 on 7/1

(Screen Shot)

Web Update Checker
By knormalnight on 7/1


A*Beginners API*
By Michael Nipper on 7/1


Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!





Affiliate Sites



 
 
   

FTP Server using the Winsock control

Print
Email
 
winzip icon
Submitted on: 12/14/1999
By: Matt* 
Level: Advanced
User Rating: By 5 Users
Compatibility:VB 5.0, VB 6.0

Users have accessed this code 13482 times.
 
(About the author)
 
     This is a simple FTP server I developed using the Winsock control. Its got a few bugs in it that need to be solved as well as some missing features. But I think you will find this useful. It is more complete than any other FTP servers posted here. Its got plenty of comments so I hope it is easy to follow. If you make any additions or improvments please let me know. Would be neet if we could make this sort of a collaborative effort towards a decent FTP server. Updated: *FIXED sending files to the client. (FINALLY!)
 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzipto decompress it.

Virus note:All files are scanned once-a-day by Planet Source Code for viruses,but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:
1)Re-scan downloaded files using your personal virus checker before using it.
2)NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
3)Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 2 submission(s) by this author

 

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this code(in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
12/14/1999 7:51:26 PM:Matt T.
Whee...
Lemme know how you guys like 
my lil app.
I will continue work on it 
and post it here for all to see.
If 
you have any suggestions/updates etc 
drop me a line or post here.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/14/1999 8:55:59 PM:LP-S
If ppl like this app you will make 
update??? then, start working on it, 
cuz i loved it. I've been lookin for 
stuff like this a long time, and i only 
found crappy ftp servers wich only has 
an winsock.accept requestid 
(kidding...)
Ok, i liked it, i wish it 
could have deletion of file features, 
im gonna see if i can do that...
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/14/1999 9:17:34 PM:Matt T.
Thanks for your feed back.
As per your 
request, delete file has been added.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/14/1999 9:18:29 PM:Branden
Sweet, just  plain sweetness
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/14/1999 9:51:41 PM:joe
On that file transfer problem maybe 
try
setting the block size down to 
1024.
That is what most servers send 
in chunk.
 
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/14/1999 10:15:22 PM:Matt T.
I've tried everything joe...
I got the 
4K/packet from CuteFTP, when it sends a 
file to my server it sends it in chunks 
around 4k...So I did the same heh.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/14/1999 11:45:30 PM:LP-S
Matt, thanx a LOT for it... this is 
great... im speechless (im brazilian, 
so i dunno if the word "Speechless" is 
right ;))
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/15/1999 6:32:59 AM:LP-S
I have a little question. I can make a 
little client to connect an ftp server, 
but how can i retrieve the directory 
listings on 2 listbox? Any idea? If you 
want, please contact me at 
48673690
Thanx
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/15/1999 10:30:32 AM:Rogger Vasquez
I PART
I notice you have trouble 
sending a file
to the client, and you 
say you think is
that the speed of the 
client or the server may be inolved. 
Well recently a group of students from 
my network class developed a File 
Server ( not FTP RFC) and a File 
CLient. 
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/15/1999 10:33:35 AM:Rogger Vasquez
We notice that in some cases the files 
did not arrived completley, in many 
ocassions when we issued a SENDATA, 
WINSOCK did not send it inmediately, 
apparently buffering it until it had 
another chunk of data. And that 
precisley slow the process. So instead 
of using the METHOD SENDATA, we use a 
Direct Call (the send command) to the 
API of Winsock32. The last 
parameter
of this command has a flag, 
that if you 
set it to 0, it will not 
buffer the
data and will try it to 
send it inmediately... The module or 
interface
to the WSOCK32.dll you can 
find it in
this site in the complete 
application category the name is IRC 
CHAT CLIENT, 
and the specific file is 
WINSOCK.BAS, it
may help, or maybe 
thats not the problem
you have.. and 
keep up the good work 
its a really 
good APP you have developed.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/15/1999 11:32:58 AM:Matt T.
Rogger, thanks for the tip.  I figured 
I would have to use the Winsock API to 
get it to work properly.  Sometime I 
would like to totally redo the entire 
FTP server using the Winsock API.  I 
looked at Winsock.bas and it was just 
too much to work with heh.  Was able to 
develop this alot faster just using the 
Winsock control because of its 
simplicity.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/15/1999 3:58:44 PM:Python
Plane GOOD!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/15/1999 9:41:15 PM:Matt T.
Bad news...I tried doing the file 
transfer by using the Winsock API 
instead of the Winsock control...No 
luck, same problem.  I dont get it  
:(
Anyone else having the same problem?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/16/1999 1:17:00 PM:Mikhael
Matt,
You have done a VERY GOOD job. I 
will use you code becouse I cant find 
an ftp server that is any 
good.
THANKS.
If you start a 
collaborative group or something I 
would like to help.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/16/1999 11:20:09 PM:Matt T.
Woohoo! Finally fixed that bug with 
clients getting incomplete 
downloads.
Sorry of the lack of 
comments with the new code that fixes 
this, its not too complicated, actually 
less complicated than it was before.  I 
added a dataSock_SendCompleted sub in 
frmMain and changed around the send 
file functions.
shew...
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/11/2000 8:45:40 PM:Cracker Jack
I'm using VB5 and I have a problem. At 
first It was Split and Replace.  But I 
added both those functions.  Now I get 
THIS error: Can't Assign To Array
It 
happens on 
tmparray = Split(ftpArgs, 
",") during the PORT part.
Please Help!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/21/2000 12:45:21 PM:Kami
Dis is wery goot page
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/23/2000 1:35:53 PM:Ryan
I get about 50 errors trying to compile 
this..to many to explain..can someone 
please email me an edited version that 
completely works..thanx
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/23/2000 1:42:05 PM:Matt T.
Ryan,
Are you using VB 5.0?  There are 
a few problems with VB 5.0 because 
there are a few functions that I use 
that only come with VB 6.0 such as the 
Replace() function.  If you search 
planet-source-code for a replace 
function you should be able to take one 
of those and put it into the program.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/8/2000 10:45:18 AM:Andy
any1 know of the site that has the 
program called VB Amp.  Its a really 
god mp3 player in vb and i lost the 
site.  Please mail me if you have it.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/10/2000 6:18:45 PM:Sean
Can you make it so you can rename a 
file.  Please e-mail me when this has 
been updated or e-mail the code that I 
would use to do this.  Thanx
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/9/2000 1:14:42 AM:Riaan
I would like to know if the reget 
function, similar to the Godzilla 
function that recontinues with a 
transmission should you loose the 
connection is in this FTP server. I 
would really appreciate it if you could 
let me know of any examples of VB code 
where somthing like this is done. I am 
with my back against the wall. Thanks 
guys, and gals.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/12/2002 8:32:38 PM:Paul Mather
You have done an AWESOME job on this 
FTP server Matt!  Its an EXCELLENT 
START!  5 Globes!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/15/2002 9:50:49 AM:Joe
GREAT JOB !
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/13/2002 1:42:55 PM:Chad Gutowsky
Hay, very nice job. I'm sure this is on 
my end, but I can't dir's. also 
Downloading works, but not up loading. 
I am using Bullet Proof as the client. 
How easy would it be to add the ability 
to change dir letters? Is there any 
updates to this killer 
code?
Regards,
Chad Gtowsky
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/30/2003 7:24:59 PM:
I can't conenct when I start the Server 
up, it just gets stuck at SYST, I will 
try looking into the problem
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/30/2003 7:37:56 PM:
There is no SYST Case, I tried putting 
one in, but this didn't help any. It 
still froze after the Reply of SYST
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/30/2003 7:43:18 PM:
ok, when using flash FXP, you may need 
to add this into the FTP_Control 
module...
        Case "SYST" 'SYST 
REPLY
            send_response 
socket, "215 UNIX Type: L8" & 
ftpArgs
after doing that Flash FXP 
worked fine and listed the dir's
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | Visual Basic Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.