Exemplo n.º 1
0
 public ChatClient(XSocket chatSocket)
 {
     XSocket                        = chatSocket;
     XSocket.OnReceive             += XSocketOnReceive;
     XSocket.ConnectionClosedEvent += XSocketOnConnectionClosedEvent;
     XSocket.Read(true);
 }
Exemplo n.º 2
0
        protected virtual void OnAcceptConnection(Socket socket)
        {
            var xSocket = new XSocket(socket);

            _clientsConnected.Add(xSocket);
            OnAccept?.Invoke(this, new XSocketArgs(xSocket));
        }
Exemplo n.º 3
0
 public Server(int port)
 {
     serverSocket           = new XSocket(port);
     serverSocket.OnAccept += ServerSocketOnOnAccept;
     serverSocket.Listen();
     Port = port;
 }
Exemplo n.º 4
0
 public PolicyClient(XSocket gameSocket)
 {
     XSocket            = gameSocket;
     XSocket.OnReceive += XSocketOnOnReceive;
     XSocket.Read(true);
 }
Exemplo n.º 5
0
 public XSocketArgs(XSocket xSocket)
 {
     XSocket = xSocket;
 }