コード例 #1
0
ファイル: Server.cs プロジェクト: xoxulin/as3kinect
        private void AcceptCompleted(object sender, SocketAsyncEventArgs e)
        {
            if (e.SocketError == SocketError.Success)
            {
                ClientConnection Client = new ClientConnection(e.AcceptSocket);

                IPEndPoint ipEp = (IPEndPoint)e.AcceptSocket.RemoteEndPoint;
                Client.Disconnected += client_Disconnected;
                Client.Recieved += client_Recieved;

                if (this.Connected != null)
                    this.Connected(this, new ConnectionEventArgs(ipEp.Address, ipEp.Port));

            }
            e.AcceptSocket = null;
            AcceptAsync(AcceptAsyncArgs);
        }
コード例 #2
0
ファイル: Server.cs プロジェクト: kinectsources/as3kinect
 public void Send(byte[] data)
 {
     ClientConnection.Send(data);
 }