Ejemplo n.º 1
0
        public void Start()
        {
            CloseAllConnections();

            WaitingServerPipe = CreateServerPipe();
            WaitingServerPipe.BeginWaitForConnection(AcceptPipeClient, null);
        }
Ejemplo n.º 2
0
        public void Start()
        {
            CloseAllConnections();
            Server = new TcpListener(IPAddress.Any, Settings.Port);
            Server.Start();
            Server.BeginAcceptTcpClient(AcceptTcpClient, null);
            WaitingServerPipe = CreateServerPipe();
            WaitingServerPipe.BeginWaitForConnection(AcceptPipeClient, null);

            ContextMenuControls.Clear();
            ContextMenuControls.Add("Stop Server", Stop);
        }
Ejemplo n.º 3
0
        public void AcceptPipeClient(IAsyncResult result)
        {
            try
            {
                WaitingServerPipe.EndWaitForConnection(result);

                Form.BeginInvoke(new Action(() => Connect(WaitingServerPipe)));

                WaitingServerPipe = CreateServerPipe();
                WaitingServerPipe.BeginWaitForConnection(AcceptPipeClient, null);
            } catch { }
        }