//method: UserConnectionToServer
        //description: initializes a new user connection to the server
        //params: Control owner - owner
        //        string server - server
        //        int port - port
        //        string userName - user's name/username
        //returns: void
        //throws ArgumentException and SocketException and IOException
        public UserConnectionToServer(Control owner, string server, int port, string userName)
        {
            this.owner = owner;

            //get name
            userName = userName.Trim();
            if(userName == "") {
                throw new ArgumentException("Name cannot be blank.", "userName");
            }

            //try to connect
            socket = new TcpClient(server, port);
            reader = new LinePeekableReader(new StreamReader(socket.GetStream()));
            writer = new StreamWriter(socket.GetStream());

            //identify as a user and provide name
            writer.WriteLine("user");
            writer.WriteLine(userName);
            writer.Flush();

            //start reading from server
            Thread thread = new Thread(ConnectionReader);
            thread.IsBackground = true;
            thread.Start();
        }
        //throws ArgumentException and SocketException and IOException
        //method: AdminConnectionToServer
        //description: initializes a new admin connection to server
        //params: Control owner - owner
        //        string server - server
        //        int port - port
        //        int questionNum - question number
        //returns: AdminConnectionToServer
        public AdminConnectionToServer(Control owner, string server, int port, int questionNum)
        {
            this.owner = owner;

            socket = new TcpClient(server, port);
            reader = new LinePeekableReader(new StreamReader(socket.GetStream()));
            writer = new StreamWriter(socket.GetStream());

            //identify as admin
            writer.WriteLine("admin");
            writer.Flush();

            GetQuestion(questionNum);
        }