public void Start(IIpcStream ipcStream) { _ipcStream = ipcStream; new Thread(Run) { IsBackground = true }.Start(); }
public void Start(IIpcStream ipcStream, IRequestQueue requestQueue) { _ipcStream = ipcStream; _requestQeueue = requestQueue; new Thread(Run) { IsBackground = true }.Start(); }
public void Run(int port) { var client = new TcpClient(); client.NoDelay = true; client.Connect(IPAddress.Loopback, port); Logger.LogInfo("Server connected to host port {0}.", port); _stream = new IpcStreamOverNetworkStream(_serializer, client.GetStream()); _stream.WriteResponse(HelloWorldProtocol.Response); _sendThread.Start(_stream); _receiveThread.Start(_stream); _typedEventForwarder.RegisterEventHandlers(); // Receive thread will terminate soon after the TCP connection to the VS package is // closed. There is nothing left for the server to do other than exiting at this point. _receiveThread.WaitOne(); Logger.LogInfo("Server terminating properly."); }
public void Run(int port) { var client = new TcpClient(); client.NoDelay = true; client.Connect(IPAddress.Loopback, port); Logger.Log("Server connected to host port {0}.", port); _stream = new IpcStreamOverNetworkStream(_serializer, client.GetStream()); _stream.WriteResponse(HelloWorldProtocol.Response); _sendThread.Start(_stream); _receiveThread.Start(_stream); _typedEventForwarder.RegisterEventHandlers(); // Receive thread will terminate soon after the TCP connection to the VS package is // closed. There is nothing left for the server to do other than exiting at this point. _receiveThread.WaitOne(); Logger.Log("Server terminating properly."); }
public void Start(IIpcStream ipcStream) { _ipcStream = ipcStream; new Thread(Run) {IsBackground = true}.Start(); }
public void Start(IIpcStream ipcStream, IRequestQueue requestQueue) { _ipcStream = ipcStream; _requestQeueue = requestQueue; new Thread(Run) {IsBackground = true}.Start(); }