CSIS 440 chat client/server project.

SircClient.h 1.2KB

    #ifndef __SIRC_CLIENT__ #define __SIRC_CLIENT__ /* Author: Matt Kava Asmt: CSIS 440, Spring 2010, Assignment 6 :: IRC-Like Client/Server Description: Sirc Client class header file */ #include "constants.h" #include "User.h" #include <stdlib.h> #include <string.h> #include <errno.h> #include <unistd.h> #include <stdlib.h> #include <curses.h> #include <string> #include <iostream> class SircClient { private: /** Private Members**/ WINDOW* _recvWindow; WINDOW* _sendWindow; int _sockfd; User* _user; /** Private Methods **/ // DrawWindow() :: draws the Curses windows for usage void DrawWindow(); // CreateConnection(string, unsigned short) :: creates the connection to the server and port specified int CreateConnection(const std::string, const unsigned short); public: /** Public Data Members **/ /** Public Methods **/ // Constructor() :: Creates a basic client, not connected SircClient(); // Deconstructor() :: Shuts down the client virtual ~SircClient(); // Init(string, unsigned short) :: Runs the client. This is the central method to the client. It does all the heavy lifting. int Init(const std::string address="localhost", const unsigned short port=DEFAULT_WKS_PORT); }; #endif