MessageQueue BeginReceive() method called twice
What will happen if I call the BeginReceive() method twice (one after the other)?
Example:
MessageQueue mq = new MessageQueue("strQueueConnectionhere");
mq.BeginReceive(); // first call
mq.BeginReceive(); // second call
Pls help
t开发者_如何学Pythonhnx :D
You'll have two asynchronise 'BeginReceive' calls waiting for a message to go onto the queue. I'm guessing that when a message pops on, then one of those will handle it and will finish with the ReceiveCompleted event while the other one waits for the next message. If you don't handle the ReceiveCompleted event, then you won't see anything happen.
加载中,请稍侯......
精彩评论