Solved

Threads with Sockets

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

920 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

18 Experts available now in Live!

Get 1:1 Help Now