Client and Server as - Processing and Arduino.

if(thisChar = 'X'){

A single equal sign is an assignment. You need the double equal sign for a comparison.

if(thisChar == 'X'){

http://arduino.cc/en/Reference/If