Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Threads with Sockets

Posted on 1998-08-07
1
139 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

839 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