public RakNet.ConnectionAttemptResult Connect(string ip, ushort remotePort, string password) { _ServerIP = ip; _ServerPort = remotePort; _ConnectPassword = password; RakNet.ConnectionAttemptResult result = _peer.Connect(_ServerIP, _ServerPort, _ConnectPassword, _ConnectPassword.Length); if (result == RakNet.ConnectionAttemptResult.CONNECTION_ATTEMPT_STARTED) { _bHasConnectSuccess = true; } return(result); }
public EngineConnection(string host, ushort port) { peer = RakNet.RakPeerInterface.GetInstance(); peer.Connect(host, port, string.Empty, 0); }