Beispiel #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);
 }
Beispiel #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);
 }
Beispiel #3
0
 private void RetryToConnect(object sender, ElapsedEventArgs e)
 {
     socket.ConnectTo(GameServer.Adress, GameServer.CommunicationPort);
 }