/// <summary> /// Connects to the Minecraft Server. If connected, don't call EndConnect. /// </summary> /// <param name="ip">The IP of the server to connect to</param> /// <param name="port">The port of the server to connect to</param> public IAsyncResult BeginConnect(string ip, ushort port, AsyncCallback asyncCallback, object state) { ServerHost = ip; ServerPort = port; // -- Connect to the server and begin reading packets. return(_networkHandler.BeginConnect(ip, port, asyncCallback, state)); }