
#include <iostream>
#include <string.h>

using namespace std;


#include "Exceptions.h"
#include "Communication.h"
#include "CommunicationTCP.h"


int
main (int argc, char *argv[])
{
  char buffer[1024];

  try {
        Communication *Client = new CommunicationTCP ("localhost", 2001);
        Client->connect (); 
        strncpy (buffer, "Hello World!", 1024);
        Client->send (buffer);
        delete Client;
    } catch (Exception e) {
        cerr << "Exception occured: " << e.getMessage() << " Execution Aborted!\n";
        exit (1);
    } catch (...) {
        cerr << "Unknown exception. Execution Aborted!\n";
        exit (1);
    }

  return 0;
}

