Solved

Delphi 7 & TidCmdTCPServer - Hangs on simultaneous calls to OnCommand.

Posted on 2007-04-10
3
450 Views
Last Modified: 2008-03-18
Hi All,

I am using Delphi 7 with Indy components, TidCmdTCPServer.
My application runs on a LAN and need to communicate with each other in this manner using Indy's TidCmdTCPServer component.
I have created several commands in the mentioned component.

But when I have 2 application sending the same command to my server application simultaneously all application (clients & server) hangs.

Does the OnCommand events of the TidCmdTCPServer automatically handles simultaneous calls to the same event?

Can some please assit me?

Thanks!
0
Comment
Question by:Marius0188
3 Comments
 
LVL 17

Accepted Solution

by:
TheRealLoki earned 500 total points
ID: 18914885
your code is likely not threadsafe. This is related to your other question.
I have an example of how to PostMessagess from within an indy thread (I prefer this to the IdSync method due to its' portability and compatiibility to Indy 9 and Indy 10)
http://sourceforge.net/projects/internetdemos
0
 
LVL 1

Expert Comment

by:Computer101
ID: 21156546
Forced accept.

Computer101
EE Admin
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

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 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 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.
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…

785 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