Esempio n. 1
0
 /// <summary>
 /// Connects to the specified server.
 /// </summary>
 /// <param name="address">
 /// The server address.
 /// </param>
 /// <param name="port">
 /// The server port.
 /// </param>
 public static void ConnectToServer(string address, int port)
 {
     lock(Lock)
     {
         DisconnectFromServer();
         server = Utils.Connect(address, port);
         server.RegisterListener(serverListener);
         if(OnServerConnected != null)
             OnServerConnected();
     }
 }