public void WriteToClient(IpcMessage message) { try { IIpcSerialize ipcSerialize = new IpcSerialize(); if (message == null) { return; } byte[] byteMessage = new byte[Constants.FullMessageSize]; byteMessage = ipcSerialize.Serialize(message); pipeStream.Write(byteMessage, 0, Constants.FullMessageSize); // TODO: Wait for respone have time out discard else } catch (IOException e) { Console.WriteLine("OutputServer: Error: {0}", e.Message); } catch (Exception ex) { Console.WriteLine(ex.Message); pipeServer.Disconnect(); } }
public void Write(IpcMessage message) { queue.Enqueue(message); }