Esempio n. 1
0
 public WorldLink(Database.Records.GameServerRecord GameServer)
 {
     this.GameServer = GameServer;
     socket = new SilverSock.SilverSocket();
     socket.OnConnected += new SilverSock.SilverEvents.Connected(Connected);
     socket.OnDataArrivalEvent += new SilverSock.SilverEvents.DataArrival(DataArrival);
     socket.OnFailedToConnect += new SilverSock.SilverEvents.FailedToConnect(FailedToConnect);
     socket.OnSocketClosedEvent += new SilverSock.SilverEvents.SocketClosed(LostConnection);
     retryTimer.Elapsed += new ElapsedEventHandler(RetryToConnect);
     System.Threading.Thread.Sleep(150);
     socket.ConnectTo(GameServer.Adress, GameServer.CommunicationPort);
 }
Esempio n. 2
0
 public WorldLink(Database.Records.GameServerRecord GameServer)
 {
     this.GameServer             = GameServer;
     socket                      = new SilverSock.SilverSocket();
     socket.OnConnected         += new SilverSock.SilverEvents.Connected(Connected);
     socket.OnDataArrivalEvent  += new SilverSock.SilverEvents.DataArrival(DataArrival);
     socket.OnFailedToConnect   += new SilverSock.SilverEvents.FailedToConnect(FailedToConnect);
     socket.OnSocketClosedEvent += new SilverSock.SilverEvents.SocketClosed(LostConnection);
     retryTimer.Elapsed         += new ElapsedEventHandler(RetryToConnect);
     System.Threading.Thread.Sleep(150);
     socket.ConnectTo(GameServer.Adress, GameServer.CommunicationPort);
 }