StTwister
asked on
Client/Server application with Indy
Hi experts,
How can i send strings and files using the Indy TCPServer and TCPClient components.
Thanks.
How can i send strings and files using the Indy TCPServer and TCPClient components.
Thanks.
ASKER
When i open your form i get a invalid stream format error. Also i am missing variants.dcu and ScktComp.dcu. Do you know where can i get them from?
What version of delphi are you using, this project was created in delphi 7.
Shane
Shane
ASKER
i am using delphi 4
ahhhhhhhh, thats why, you will have to look in your help for TClientSocket or TServerSocket then look at what unit it they use (assuming of course, these exist in Delphi 4 - I can't remember, but im sure they did)
Anyway, regardless, If you can't get it to compile in delphi 4, I recommend the following:
Create a new application, add the two components (TClientSocket, TServerSocket), change the properties to reflect what i add in my code at runtime, then look at all my events I add at runtime, cut and paste the code from ,my events into your components events.
WHen you drop a TClientSocket on your form, hte appropriate unit will be added for you!
Shane
Anyway, regardless, If you can't get it to compile in delphi 4, I recommend the following:
Create a new application, add the two components (TClientSocket, TServerSocket), change the properties to reflect what i add in my code at runtime, then look at all my events I add at runtime, cut and paste the code from ,my events into your components events.
WHen you drop a TClientSocket on your form, hte appropriate unit will be added for you!
Shane
STTwister,
You may want to increase your points in the future for questions of this amplitude, otherwise you wont get many experts to bite - as you can tell, not many are jumping to answer your question. If you would have had a greater number of points, i guarantee, others would have given you code for the Indy components as well
Just a suggestion:
Shane
You may want to increase your points in the future for questions of this amplitude, otherwise you wont get many experts to bite - as you can tell, not many are jumping to answer your question. If you would have had a greater number of points, i guarantee, others would have given you code for the Indy components as well
Just a suggestion:
Shane
ASKER
the problem is that i don't have TClientSocket and TServerSocket components. I have Delphi 4 Standard Edition, which doesn't got the internet pallete. That's why i'm using the indy package.
Thanks.
Thanks.
ahhhhh, yup thats a problem
K, let me see what i can come up with for you
Shane
K, let me see what i can come up with for you
Shane
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ok, i changed my mind, i want to use TSimpleTCPServer and TSimpleTCPClient ( u can get them from http://swiss.torry.net/sockets.htm ).
To send strings, u use TSimpleTCPClient.Send(Buff , BuffLength), but how can i send files?
Note that i increased the points to 50.
Thanks.
To send strings, u use TSimpleTCPClient.Send(Buff
Note that i increased the points to 50.
Thanks.
ASKER
I found the answer myself. Can someone please close the question and refund the points???
Thanks.
Thanks.
http://www.geocities.com/ielite_ielite/projects/multiplay.zip
just uncomment the sendText & receiveText lines (code is set to send bitmaps now).
Shane