Beispiel #1
0
 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();
 }
Beispiel #3
0
    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.");
    }
Beispiel #4
0
        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();
 }