[muscle] Re: signalowner

  • From: "Jeremy Friesner" <jaf@xxxxxxxxxxxx>
  • To: muscle@xxxxxxxxxxxxx
  • Date: Fri, 03 Jun 2005 09:13:55 PDT (-0700)

Hi Win,

> I'm yet a bit further.  I can send messages now , but i don't arrive to
> be signaled when they arrive. 

I'm not sure I understand.  Do you mean that SignalOwner() is not called when a 
Message arrives from the server=3F  What Messages are you expecting to arrive 
from the server=3F

> I have used a descendant of
> messagetransceiverthread and I have overloaded signalowner().
> But when a message arrives in the function down here, the function
> SignalInternalThread is chosen and not SignalOwner.  

SignalInternalThread() is called by SendMessageToInternalThread(), so that the 
network I/O thread will wake up and send your outgoing Message(s) to the 
server.  That is normal behaviour for Messages that your program is sending to 
the server.

SignalOwner() is only called when a Message is received from the server by the 
network I/O thread.  The network I/O thread posts the incoming Message to a 
Queue, and then calls SignalOwner() to notify your main() thread that the 
Message is available for pickup.  That is the expected behaviour for Messages 
that your program is receiving from the server.

> How can I fix this =3F

It's not clear to me what is broken, if anything.  Can you email me a short 
example program that you think should work, but doesn't=3F  Then I will 
understand better what the situation is.


ps An easy way to test sending and receiving, using a single client, is to have 
your client program send a PR=5FCOMMAND=5FGETPARAMETERS Message to the server.  
The server will immediately respond with a PR=5FRESULT=5FPARAMETERS reply 
Message, so you should see SignalOwner() get called a few moments after you 

Other related posts: