Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:20:45

0001 #ifndef  __EVENTRECEIVERCLIENT_H__
0002 #define  __EVENTRECEIVERCLIENT_H__
0003 
0004 
0005 #include <string>
0006 #include <netinet/in.h>
0007 
0008 
0009 class Event;
0010 
0011 class eventReceiverClient
0012 {
0013  public:
0014   eventReceiverClient( const std::string hostname, const int flags=0, const int port =8080);
0015   ~eventReceiverClient();
0016 
0017   Event *getEvent(const int eventnumber, const int flag = 0);
0018   void setVerbosity(const int v) { _verbosity = v;};
0019   int getVerbosity() const { return _verbosity;};
0020   int getStatus() const { return _broken;};
0021   int setUserTimeout(const int t) { _user_timeout = t; return 0;};
0022   int getUserTimeout() const { return _user_timeout;};
0023   int hadTimeout() const { return _had_timeout;};
0024   
0025  protected:
0026 
0027   int _sockfd;
0028   int _flags;
0029   int _broken;
0030   int _verbosity;
0031   int _timeout;
0032   int _user_timeout;
0033   int _had_timeout;
0034   int _port;
0035   
0036   std::string _hostname;
0037   struct sockaddr_in _serveraddr; 
0038 
0039   struct hostent *_phost;
0040 
0041 
0042   
0043 };
0044 
0045 #endif