frangers99
asked on
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.
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.
here's all you need:
https://www.experts-exchange.com/jsp/qShow.jsp?ta=delphi&qid=10104621
https://www.experts-exchange.com/jsp/qShow.jsp?ta=delphi&qid=10104621
I am pretty sure you will find all you need for your file transfers at this site
https://www.experts-exchange.com/jsp/qShow.jsp?ta=delphi&qid=10104621
Bye!!
https://www.experts-exchange.com/jsp/qShow.jsp?ta=delphi&qid=10104621
Bye!!
I'm just wondering airboy.. no offense.. are you blind ?
ASKER
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?
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..
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..
ASKER
but there aren't any components, it would make life easier
in fact there are.. FTP server and FTP client in fpiette's package
ASKER
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
? the opposite way ? ftp can server can RECEIVE and SEND files...
so it's ok for your needs..
so it's ok for your needs..
? the opposite way ? ftp server can RECEIVE and SEND files...
so it's ok for your needs..
so it's ok for your needs..
ASKER
yeah sorry, i wrote the wrong thing, do you have any sample code, then you get the points.
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..
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..
ASKER
just what code do you use to send a file to the client if you are the server?
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
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
btw
i'm using d4 pro no extra components
i'm using d4 pro no extra components
frangers.. look at the FTP server DEMO from fpiette... it's all there..
Well ftp is not quite icq... now is it? i'm not using fpiette's stuff...
so how about it???
ASKER
just got back from a holiday, i'll check it out
ASKER
I don't have the majority of the components required
? what do you mean ? install the full ics package..
ASKER
no, I ment in rejection to God Ares answer of the program file_trans that you can modify.
so what is the problem? You don't have the components i have used? Install d4 pro... i haven't used anything fancy.
ASKER
i have d4 standard
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
frangers99 i wish you the best, you should give bryan7 the points, but don't forget to compress!!!! sending a screen can be HUGE
you can use the Ftp-Components from ICS.
Look at the ICS-Homepage for more Information.
bye