Beispiel #1
0
        public IProcessedMessage Receive(byte[] message, IMessageStream stream, MessageCallback callback)
        {
            MessageProcessorWorker processThread = new MessageProcessorWorker(message, stream, callback);
            Thread thread = new Thread(processThread.ReceiveMessage);

            processThread.ThreadId = thread.ManagedThreadId;
            thread.Start();
            return(processThread);
        }
Beispiel #2
0
        public IProcessedMessage Send(Object model, IMessageStream stream, MessageCallback callback)
        {
            MessageProcessorWorker processThread = new MessageProcessorWorker(model, stream, callback);
            Thread thread = new Thread(processThread.SendMessage);

            processThread.ThreadId = thread.ManagedThreadId;
            thread.Start();
            return(processThread);
        }
 internal MessageParser(byte[] bytes, MessageProcessorWorker workerThread)
 {
     _bytes        = bytes;
     _workerThread = workerThread;
 }