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

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

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

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…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

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