Solved

File Transfer

Posted on 2000-04-14
28
211 Views
Last Modified: 2010-04-04
I want to make a program that does the equivalent to ICQ File Transfer.

ie. a client selects a file to send and the receiver has the option to choose the folder to receive to.

I need this program to run on a land using TCP.

I only have Delphi 4 Standard, so I am currently using the freeware FPIette ICS components although i am prepared to use winshoes although i would prefer not to.

0
Comment
Question by:frangers99
  • 10
  • 9
  • 7
  • +2
28 Comments
 

Expert Comment

by:haehnen
Comment Utility
HI,
you can use the Ftp-Components from ICS.
Look at the ICS-Homepage for more Information.
bye
0
 
LVL 3

Expert Comment

by:bryan7
Comment Utility
0
 

Expert Comment

by:airboy
Comment Utility
I am pretty sure you will find all you need for your file transfers at this site
http://www.experts-exchange.com/jsp/qShow.jsp?ta=delphi&qid=10104621
Bye!!
0
 
LVL 3

Expert Comment

by:bryan7
Comment Utility
I'm just wondering airboy.. no offense.. are you blind ?
0
 

Author Comment

by:frangers99
Comment Utility
can either of you explain that code, i've seen it before but is there a comopnent that does most of the work or is that the easiest way?
0
 
LVL 3

Expert Comment

by:bryan7
Comment Utility
it uses fpiette's component to do so.. it's very easy in a few steps:

1. side1 connects to side2
2. side2 asks the file transmision to start
3. side1 gets a piece of the file and sends it (let's say 8kb)
4. when side2 has received the 8kb it asks side1 for the next piece
5. side1 sends next 8kb piece....
6.. back to step 4 until file is complete..

I have made this once.. but a bit more complex...
you can have 2 connections.. 1 for file transmision only
and 2 for passing file name and size, make pause/resume.
etc..

0
 

Author Comment

by:frangers99
Comment Utility
but there aren't any components, it would make life easier
0
 
LVL 3

Expert Comment

by:bryan7
Comment Utility
in fact there are.. FTP server and FTP client in fpiette's package
0
 

Author Comment

by:frangers99
Comment Utility
i have had a look at those components but it works the opposite way, I want my client to send the files and the server to receive them, i spose FTP does that, what's the most effective way to go about this problem
0
 
LVL 3

Expert Comment

by:bryan7
Comment Utility
? the opposite way ? ftp can server can RECEIVE and SEND files...
so it's ok for your needs..
0
 
LVL 3

Expert Comment

by:bryan7
Comment Utility
? the opposite way ? ftp server can RECEIVE and SEND files...
so it's ok for your needs..
0
 

Author Comment

by:frangers99
Comment Utility
yeah sorry, i wrote the wrong thing, do you have any sample code, then you get the points.
0
 
LVL 3

Expert Comment

by:bryan7
Comment Utility
well, I'm doing an FTP client with it.. but the code is long..
I can do it.. but ics already has 2 samples.. on is an ftp CLIENT sample.. and the other is an ftp SERVER sample.. you can compile and run them at the same time and try it .. server as localhost.. then look at the sources.. they are quite clear and easy and with some explanations..

but if you want I can do the samples to show you..
0
 

Author Comment

by:frangers99
Comment Utility
just what code do you use to send a file to the client if you are the server?
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 7

Expert Comment

by:God_Ares
Comment Utility
your awnser is at

http://www.angelfire.com/ok/GODARES/downl.html

it is pretty easy to modify it exactly to your needs... but if you want me to do it 4 u don't reject my awnser but give an extra comment, and raise the points a bit.

greetz

Ares

comments or questions to

god_ares@yahoo.com
0
 
LVL 7

Expert Comment

by:God_Ares
Comment Utility
btw

i'm using d4 pro  no extra components
0
 
LVL 3

Expert Comment

by:bryan7
Comment Utility
frangers.. look at the FTP server DEMO from fpiette... it's all there..
0
 
LVL 7

Expert Comment

by:God_Ares
Comment Utility
Well ftp is not quite icq... now is it? i'm not using fpiette's stuff...
0
 
LVL 7

Expert Comment

by:God_Ares
Comment Utility
so how about it???
0
 

Author Comment

by:frangers99
Comment Utility
just got back from a holiday, i'll check it out
0
 

Author Comment

by:frangers99
Comment Utility
I don't have the majority of the components required
0
 
LVL 3

Expert Comment

by:bryan7
Comment Utility
? what do you mean ? install the full ics package..
0
 

Author Comment

by:frangers99
Comment Utility
no, I ment in rejection to God Ares answer of the program file_trans that you can modify.
0
 
LVL 7

Expert Comment

by:God_Ares
Comment Utility
so what is the problem? You don't have the components i have used? Install d4 pro... i haven't used anything fancy.
0
 

Author Comment

by:frangers99
Comment Utility
i have d4 standard
0
 
LVL 7

Expert Comment

by:God_Ares
Comment Utility
well if you don't have the components i have used.. too bad..

i'm shure FPIette has a tcp/ip component just send over the filename filesize and blocks of 1024bytes let

so you can write a program that does the icq transver

person1                  person2
filename >
                       < okfilename
filesize >             < okfilesize

 
(okfilesize should be make by a button click   that is for accepting the transver)

repeat                   repeat
 if filesizeleft
  >=1024
  send 1024k >      
                    < ok1024            
 else
  send remaining  
                   <okremaining

done:=done or timeout
until done               until done



why 1024 bytes ?   it's easy to make a calculation like  4 kb/s
0
 
LVL 3

Accepted Solution

by:
bryan7 earned 50 total points
Comment Utility
0
 
LVL 7

Expert Comment

by:God_Ares
Comment Utility
yep that should be it... didn't test it do...


frangers99 i wish you the best, you should give bryan7 the points, but don't forget to compress!!!! sending a screen can be HUGE
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video discusses moving either the default database or any database to a new volume.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now