Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Open Source Projects
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Open Source Projects The place to discuss Basic4ppc open source applications.


Low-level FTP upload with progress


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-10-2008, 05:32 AM
brathbone's Avatar
Junior Member
 
Join Date: Feb 2008
Location: Rutherfordton, North Carolina
Posts: 19
Send a message via MSN to brathbone
Default Low-level FTP upload with progress

Greetings to the Basic4PPC community,

This is my first post, and I would like to thank all of you for the work you've done. Basic4PPC is a fine product. Helpful posts in the forum, and open-source projects made my transition to Basic4PPC a breeze.

I needed to prototype a FTP-based application and was up and running quickly, but I really needed to show progress during FTP uploads. After searching the forum and seeing that the built-in FTP methods are synchronous, which makes perfect sense for simplicity's sake, I decided to port my FTP socket code from REALbasic to Basic4PPC and make it open-source.

Though the project currently only does uploads, I will be working on downloads in the near future.

I've tested with Windows and UNIX FTP servers, and so far all is well. There is certainly a good amount of work left to be done, but this should be a really good start.

What this project does:

Provides PASV mode binary FTP file uploads with progress.

Uses network.client.DataAvailable to provide a mostly complete, client-side FTP implementation.

Passive (PASV) mode port is used for firewall friendliness. For those of you not familiar with PASV vs. PORT mode I will provide a brief explanation. FTP uses two connections: a command socket and a data socket. The command socket connects outbound from the client on port 21 to the server, which is listening for connections on port 21. In Active (PORT) mode, the server would connect the data socket back to the client, which would have to be listening for this connection. Many firewalls support this, but there can be problems. In PASV mode, the server listens on a new random port and sends that random port to the client via the command socket. The client then connects the data socket outbound on the dynamic port, thus all connections from the client are outbound and most client-side firewall issues should be averted.

Any comments, bug reports and/or contributions will be welcome and appreciated. I hope some of you find this useful.

Best wishes,
Attached Files
File Type: zip ftp_progress_v1.zip (50.2 KB, 94 views)
__________________
Brian Rathbone

Laptop: AMD Turion 64 Mobile 2ghz, 2GB RAM, Dual GeForce Go 7900 GTX 768MB SLI, Dual 200GB HDD at RAID0. XP Pro sp2

Device: Treo 750, WM6, 300mhz,128MB RAM, 2GB miniSD, 240x240 display
Reply With Quote
  #2 (permalink)  
Old 02-10-2008, 06:49 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,806
Default

Thank you for sharing this valuable code.
I'm sure happy that an FTP expert has joined our community
Reply With Quote
  #3 (permalink)  
Old 02-10-2008, 06:54 AM
brathbone's Avatar
Junior Member
 
Join Date: Feb 2008
Location: Rutherfordton, North Carolina
Posts: 19
Send a message via MSN to brathbone
Default

Thanks Erel. I'm darn glad to be here and look forward to doing some cool things.

__________________
Brian Rathbone

Laptop: AMD Turion 64 Mobile 2ghz, 2GB RAM, Dual GeForce Go 7900 GTX 768MB SLI, Dual 200GB HDD at RAID0. XP Pro sp2

Device: Treo 750, WM6, 300mhz,128MB RAM, 2GB miniSD, 240x240 display
Reply With Quote
  #4 (permalink)  
Old 02-10-2008, 11:42 AM
giannimaione's Avatar
Senior Member
 
Join Date: Apr 2007
Location: Naples, Italy
Posts: 125
Send a message via Skype™ to giannimaione
Thumbs up

good job
__________________
Gianni Maione
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload text file aerohost Questions & Help Needed 2 06-17-2008 05:37 PM
Outlook set sensitivity level Rallig Questions & Help Needed 5 05-17-2008 02:28 PM
Progress bar on FTP download willisgt Questions & Help Needed 16 01-28-2008 04:22 PM
HTTP upload sample bluedude Questions & Help Needed 2 12-28-2007 08:59 PM
Vertical Progress bar davelew1s Questions & Help Needed 2 08-23-2007 06:09 PM


All times are GMT. The time now is 04:50 AM.


Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0