Solved

Client/Server application with Indy

Posted on 2004-04-26
11
529 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Reconfigure Delphi Install? 2 51
drawing animated level bar based on numbers 3 98
Tvertscrollbox like a whatsapp layout 5 28
MS Access from Delphi 31 33
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

831 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