#include #include #include "socket.h" #include "socketexception.h" using namespace std; int main ( int argc, int argv[] ){ try{ Socket socket ( "localhost", 30000 ); std::string reply; try{ socket << "Test message."; socket >> reply; } catch ( SocketException& ) {} cout << "We received this response from the server:\n\"" << reply << "\"\n"; }catch ( SocketException& e ){ cout << "Exception was caught:" << e.description() << "\n"; } return 0; }