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

Client/Server application with Indy

Hi experts,

How can i send strings and files using the Indy TCPServer and TCPClient components.

Thanks.
0
StTwister
Asked:
StTwister
  • 6
  • 5
1 Solution
 
shaneholmesCommented:
If you interested, I have an example of using TServerSocket & TClientSocket

http://www.geocities.com/ielite_ielite/projects/multiplay.zip

just uncomment the sendText & receiveText lines (code is set to send bitmaps now).

Shane
0
 
StTwisterAuthor Commented:
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?
0
 
shaneholmesCommented:
What version of delphi are you using, this project was created in delphi 7.

Shane
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
StTwisterAuthor Commented:
i am using delphi 4
0
 
shaneholmesCommented:
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
0
 
shaneholmesCommented:
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
0
 
StTwisterAuthor Commented:
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.
0
 
shaneholmesCommented:
ahhhhh, yup thats a problem

K, let me see what i can come up with for you

Shane
0
 
StTwisterAuthor Commented:
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.
0
 
StTwisterAuthor Commented:
I found the answer myself. Can someone please close the question and refund the points???

Thanks.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now