public void SendMessage(InterProcessMessage msg) { if (!_running) { return; } var msgStr = msg.Serialize() + PackageSeparator; var outBuffer = TcpEncoding.GetBytes(msgStr); var len = outBuffer.Length; Console.WriteLine(msgStr); _ns.Write(outBuffer, 0, len); _ns.Flush(); }
public void SendMessage(InterProcessMessage msg) { Console.WriteLine(msg.Serialize()); }