Solved

Client/Server application with Indy

Posted on 2004-04-26
11
532 Views
Last Modified: 2010-04-05
Hi experts,

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

Thanks.
0
Comment
Question by:StTwister
  • 6
  • 5
11 Comments
 
LVL 11

Expert Comment

by:shaneholmes
ID: 10920330
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
 
LVL 2

Author Comment

by:StTwister
ID: 10921467
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
 
LVL 11

Expert Comment

by:shaneholmes
ID: 10921481
What version of delphi are you using, this project was created in delphi 7.

Shane
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

 
LVL 2

Author Comment

by:StTwister
ID: 10921561
i am using delphi 4
0
 
LVL 11

Expert Comment

by:shaneholmes
ID: 10921617
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
 
LVL 11

Expert Comment

by:shaneholmes
ID: 10921638
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
 
LVL 2

Author Comment

by:StTwister
ID: 10921657
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
 
LVL 11

Expert Comment

by:shaneholmes
ID: 10921835
ahhhhh, yup thats a problem

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

Shane
0
 
LVL 11

Accepted Solution

by:
shaneholmes earned 50 total points
ID: 10921866
0
 
LVL 2

Author Comment

by:StTwister
ID: 10936719
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
 
LVL 2

Author Comment

by:StTwister
ID: 10947240
I found the answer myself. Can someone please close the question and refund the points???

Thanks.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

791 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