/* A simple server in the internet domain using TCP The port number is passed as an argument */ #include "receiver_defs.h" #include "MySocketTCP.h" #include "slsReceiver_funcs.h" #include using namespace std; int main(int argc, char *argv[]) { int ret = slsDetectorDefs::OK; MySocketTCP *socket = NULL; string fname = ""; bool shortfname = false; //parse command line for config for(int iarg=1;iargConnect()>=0){ #ifdef VERY_VERBOSE cout << "Conenction accepted" << endl; #endif ret = receiver->decode_function(); #ifdef VERY_VERBOSE cout << "function executed" << endl; #endif socket->Disconnect(); #ifdef VERY_VERBOSE cout << "connection closed" << endl; #endif } } delete socket; cout << "Goodbye!" << endl; return 0; }