public void SendMsg(String msg)
 {
     try {
         sock.getOut().WriteLine(msg);
         sock.getOut().Flush();
     } catch (Exception e) {
     }
 }
        /// <summary>Log in to the server.</summary>
        public bool login()
        {
            try {
                string toSend = "LOGIN " + username;
                socket.getOut().WriteLine(toSend);
                socket.getOut().Flush();

                return(true);
            } catch (Exception e) {
                ChessActivity.OnServerFail();
                return(false);
            }
        }