Your data reading logic is highly suspect. My first comment is that I suggest you adopt and follow a code indentation style. The compiler is perfectly happy to have everything lined up in the first column, but it will make your life much easier to use a structured style, and make the organization of the code much easier to follow.
I've taken the liberty of indenting your code in a manner that makes the structure stand out, even if it does take up a few extra lines. I've also added line numbers for the discussion that follows.
1 void loop()
3 client.connect(ip,port); // Connects to a specified IP address and port
4 if (client.connected()) // Returns true if the client is connected, false if not
6 if (!clientActive)
7 Serial.println("New Client connection.");
9 clientActive = true;
11 if (client.available()) // Returns the number of bytes available for reading
13 incomingByte == client.read(); // Read the next byte recieved from the server the client is connected to
14 Serial.print("From client: \"");
19 if (client.read() == 'H')
23 if (client.read() == 'L')
30 if (clientActive)
32 client.stop(); // Disconnected from the server
33 Serial.println("Client disconnected.");
At line 11, you are connected, and you check if any characters are available. That's reasonable, but the logic quickly falls apart.
Line 12: you read an incoming character from the connection, and store it in the variable incomingByte. But you never do anything else with that variable, you have in effect thrown the first received character away.
Line 14 prints out the beginning of a message, then lines 15 and 16 loop through all of the available characters and echo them to the serial port. Line 17 finishes the message and prints a closing quote.
At Line 19, you are in one of two states: either there was no incoming data available (line 11 returned zero) or you have used up all available characters because of the loop on lines 15 and 16. So, at this point, it's a pretty safe bet that there are no characters waiting to be read. But the code in line 19 tries to read a character anyway, and the odds are virtually certain that there will be nothing, so read() will return -1. That is not the same as 'H' so the statement on line 21 will not be called.
At line 23, we are in the same situation: it's very unlikely a character is available in unless it has come in during the few microseconds since completing the previous logic that read and printed all of the waiting data. So read() will likely return -1. Again, this is not the same as 'L' so the statement on line 25 will never get called.
At line 13, you are reading a character, and putting it in a variable. You probably want to be using that value rather than keep on reading more characters.
Lines 14 to 17 print all data that is available from the client. You probably don't want to do this. I would think it should be a simpler version that does not have a while loop, and simply prints the value from incomingByte, with appropriate text decorating the output.
Then, I would think that lines 19 through 26 should be inside of the line 11 client.available() if statement's compound statement. lines 19 and 23 should be checking the value of incomingByte, not trying to read a new character.
Basically, if connected: check if characters are available, and if so: read one in, print it out, and test for the control values.