Re: [Quickfix-developers] Is Session.sendToTarget asynchronous?
Brought to you by:
orenmnero
From: K. F. <kfr...@gm...> - 2013-03-14 23:44:23
|
Hello Marcelo! I cannot give you a definitive answer to your question, but I have some information, in line, below. On Thu, Mar 14, 2013 at 4:49 PM, Marcelo Beckmann <bec...@gm...> wrote: > > Dear all, > ... > I'm using quick fix C# library, I wonder if Session.sendToTarget(msg, sessionId) is asynchronous or blocker method. I asked a similar question, but it was about the c++ version, I didn't fully understand the answer, and I didn't verify the conclusion, so my response may not be reliable. My question and the resulting thread are here: http://sourceforge.net/mailarchive/message.php?msg_id=30448623 My supposition is that if you use a SocketInitiator (or SocketAcceptor) (and I assume that the same classes exists in the c# version), then the call to FIX::Session::sendToTarget (your Session.sendToTarget) is synchronous / blocking, that is, the full call is processed by the calling thread. But if you use a ThreadedSocketInitiator (or ThreadedSocketAcceptor), then the call is asynchronous / non-blocking, that is, the calling thread posts the call to some queue, returning essentially immediately, and some other thread plucks the call off of the queue and does the real work. Again, that's my working theory, but don't have any conclusive evidence for it. It would be great if someone who really knows could chime in. (I did try reading the code, but got lost in what appeared to be an infinite recursion, so I must not have been looking at it right.) > ... > Best regards, > > Marcelo Beckmann Good luck, and Happy FIXing! K. Frank |