• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 220
  • Last Modified:

File Transfer

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
frangers99
Asked:
frangers99
  • 10
  • 9
  • 7
  • +2
1 Solution
 
haehnenCommented:
HI,
you can use the Ftp-Components from ICS.
Look at the ICS-Homepage for more Information.
bye
0
 
bryan7Commented:
0
 
airboyCommented:
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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
bryan7Commented:
I'm just wondering airboy.. no offense.. are you blind ?
0
 
frangers99Author Commented:
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
 
bryan7Commented:
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
 
frangers99Author Commented:
but there aren't any components, it would make life easier
0
 
bryan7Commented:
in fact there are.. FTP server and FTP client in fpiette's package
0
 
frangers99Author Commented:
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
 
bryan7Commented:
? the opposite way ? ftp can server can RECEIVE and SEND files...
so it's ok for your needs..
0
 
bryan7Commented:
? the opposite way ? ftp server can RECEIVE and SEND files...
so it's ok for your needs..
0
 
frangers99Author Commented:
yeah sorry, i wrote the wrong thing, do you have any sample code, then you get the points.
0
 
bryan7Commented:
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
 
frangers99Author Commented:
just what code do you use to send a file to the client if you are the server?
0
 
God_AresCommented:
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
 
God_AresCommented:
btw

i'm using d4 pro  no extra components
0
 
bryan7Commented:
frangers.. look at the FTP server DEMO from fpiette... it's all there..
0
 
God_AresCommented:
Well ftp is not quite icq... now is it? i'm not using fpiette's stuff...
0
 
God_AresCommented:
so how about it???
0
 
frangers99Author Commented:
just got back from a holiday, i'll check it out
0
 
frangers99Author Commented:
I don't have the majority of the components required
0
 
bryan7Commented:
? what do you mean ? install the full ics package..
0
 
frangers99Author Commented:
no, I ment in rejection to God Ares answer of the program file_trans that you can modify.
0
 
God_AresCommented:
so what is the problem? You don't have the components i have used? Install d4 pro... i haven't used anything fancy.
0
 
frangers99Author Commented:
i have d4 standard
0
 
God_AresCommented:
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
 
God_AresCommented:
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

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

  • 10
  • 9
  • 7
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now