CSIS 440 chat client/server project.

client.cpp 756B

    /* Author: Matt Kava Asmt: CSIS 440, Spring 2010, Assignment 6 :: IRC-Like Client/Server Description: A basic implementation of the SircClient class. */ #include "SircClient.h" #include <iostream> using namespace std; int main(int argc, char* argv[]) { unsigned short port = DEFAULT_WKS_PORT; string address = "localhost"; switch(argc) { // port case 3: { port += atoi(argv[2]); } // address case 2: { address = argv[1]; break; } // incorrect number of params default: { cerr << "Usage: " << argv[0] << " <Server Address> [Server Port]" << endl; return 1; break; } } SircClient client = SircClient(); cout << client.Init(address, port) << endl; cout << "Client terminating.\n"; return 0; }