Solved

Threads with Sockets

Posted on 1998-08-07
1
135 Views
Last Modified: 2010-04-04
I'm trying to create a thread object that contains a TClientSocket component.  I need this so I can create new threads to send messages to my server and then end when they have sent the message (or timed out).  I've done most of it, but the TClientSocket is not receiving any messages to say it's connected or timed out.  I get the connecting message but stepping through the code for the component shows that that event is fired before the socket is attempted to connect anyway.  Does the component use Windows messages to work ?  I tried to call the create for the ClientSocket with my TForm1 as the owner and it still didn't work.  Any help appreciated.

Daz
0
Comment
Question by:Dazza051197
1 Comment
 
LVL 8

Accepted Solution

by:
ZifNab earned 100 total points
ID: 1361724
Dazza,

 Did you know about the freeware components of F.Piette?
 No, well you should! They are far more better than the Delphi ones (at least these of D3). You get free help! Anytime! And most of all (for your purpose), you can use these components on two ways :

 1. Synchronious, program waits until command terminated
 2. Asynchronious, program doesn't wait = far better then threads (François has shown a demo about these two)

On his site, lot's of demo's too. I hope I've convinced you to use F.Piette's components.

PS. They keep the same also, we can't say this about Inprises components! D3 <> D4 <> ...?


here is the url. : http://www.rtfm.be/fpiette/indexuk.htm

Please, look at it!!! I assure you it's better than in your dreams!

Problems? Just ask or ask it at their free mailing list.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

757 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now