Solved

Threads with Sockets

Posted on 1998-08-07
1
141 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
[X]
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
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

726 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