Instead of sending XML data and looking for EOF char, send size of serialized data first
Instead of sending XML data and looking for EOF char, send size of serialized data first