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

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