/// <summary> /// Connects to a remote netServer. /// </summary> /// <param name="ip">The IP address of the netServer.</param> /// <param name="port">The port of the netServer.</param> /// <param name="password">The netServer password.</param> public void ClientConnect(string ip, int port, string password) { if (IsMPServerInitialized) { Log.Warning("Cannot connect client to server. Server is initialized."); return; } if (!IsMPClientInitialized) { Log.Warning("Cannot connect client to server. CLient is not initialized."); } Log.Message("Connecting client."); MPClient.ConnectToServer(ip, port, password); Log.Message("Client connected."); }
/// <summary> /// Connect to localhost on port 4230 with no password (""). /// </summary> public void ClientConnect() { if (IsMPServerInitialized) { Log.Warning("Cannot connect client to server. Server is initialized."); return; } if (!IsMPClientInitialized) { Log.Warning("Cannot connect client to server. CLient is not initialized."); } Log.Message("Connecting client."); MPClient.ConnectToServer(); Log.Message("Client connected."); }