public void Connect(IPEndPoint server) { if (ConnectionState != ConnectionState.Disconnected) { return; } ServerAddress = server; ConnectionState = ConnectionState.Connecting; Socket = new LengthedSocket(LengthedSocket.SizeType.Word); Socket.BeginConnect(ServerAddress, EndConnect, null); }