Esempio n. 1
0
 public void ConnectSuccess()
 {
     Logger.LogInfo("Connection success at {0}:{1}", new object[] { this._serverName, this._port });
     this._reactor   = new UdpReactor(base._socket, base._sync, base._socket.RemoteEndPoint, null);
     this._connected = true;
     this.HandleConnectedEvent();
 }
Esempio n. 2
0
        public void StartWithNoConnection()
        {
            IPEndPoint endPoint = new IPEndPoint(this.GetServerIP(this._serverName)[0], this._port);

            Logger.LogInfo("Connection success at {0}:{1}", new object[] { this._serverName, this._port });
            this._reactor   = new UdpReactor(base._socket, base._sync, endPoint, null);
            this._connected = true;
            this.HandleConnectedEvent();
        }
Esempio n. 3
0
 private UdpReactor GetReactor(EndPoint endPoint, ref bool newCommer)
 {
     if (!this._clients.ContainsKey(endPoint))
     {
         UdpReactor reactor = new UdpReactor(null, base._sync, endPoint, this);
         this._clients[endPoint] = reactor;
         this.OnAccept(reactor);
         newCommer = true;
         return(reactor);
     }
     newCommer = false;
     return(this._clients[endPoint]);
 }
Esempio n. 4
0
 public UdpStateObject(Socket socket, EndPoint endPoint, UdpReactor reactor)
 {
     this._socket   = socket;
     this._endPoint = endPoint;
     this._reactor  = reactor;
 }