Added a shielding to prevent sending data if the TcpClient isn't connected. Also added an extension method to write to Trace.
Implemented custom behaviors in the server class.