public void OnStatusChanged(StatusCode statusCode) { switch (statusCode) { case StatusCode.Connect: peer.EstablishEncryption(); break; case StatusCode.Disconnect: ServerConnected = false; break; case StatusCode.EncryptionEstablished: ServerConnected = true; break; } }
public void OnStatusChanged(StatusCode statusCode) { switch (statusCode) { case StatusCode.Connect: DebugReturn(DebugLevel.INFO, "establishing connect...."); peer.EstablishEncryption(); break; case StatusCode.Disconnect: peer = null; ServerConnected = false; IANTGame.ResponseManager.SystemResponseManager.CallConnectResponse(false); break; case StatusCode.EncryptionEstablished: ServerConnected = true; IANTGame.ResponseManager.SystemResponseManager.CallConnectResponse(true); break; } }
public void OnStatusChanged(StatusCode statusCode) { switch (statusCode) { case StatusCode.Connect: peer.EstablishEncryption(); break; case StatusCode.Disconnect: case StatusCode.DisconnectByServer: case StatusCode.DisconnectByServerLogic: case StatusCode.DisconnectByServerUserLimit: case StatusCode.TimeoutDisconnect: Console.WriteLine(username + " disconnected"); break; case StatusCode.EncryptionEstablished: Login(peer, username, password); break; } }
public bool EstablishEncryption() { return(_peer.EstablishEncryption()); }