Solved

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

Posted on 2007-04-10
3
449 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

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

863 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

20 Experts available now in Live!

Get 1:1 Help Now