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(); }
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(); }
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]); }
public UdpStateObject(Socket socket, EndPoint endPoint, UdpReactor reactor) { this._socket = socket; this._endPoint = endPoint; this._reactor = reactor; }