|
UniSet
2.6.0
|
00001 // ------------------------------------------------------------------------- 00002 #ifndef USocket_H_ 00003 #define USocket_H_ 00004 // ------------------------------------------------------------------------- 00005 #include <Poco/Net/Socket.h> 00006 #include "PassiveTimer.h" // fot timeout_t 00007 // ------------------------------------------------------------------------- 00008 namespace uniset 00009 { 00010 00011 class USocket: 00012 public Poco::Net::Socket 00013 { 00014 public: 00015 00016 // dup and accept...raw socket 00017 USocket( int sock ); 00018 virtual ~USocket(); 00019 00020 // set keepalive params 00021 // return true if OK 00022 bool setKeepAliveParams( timeout_t timeout_sec = 5, int conn_keepcnt = 1, int keepintvl = 2 ); 00023 00024 int getSocket(); 00025 00026 protected: 00027 void init( bool throwflag = false ); 00028 00029 private: 00030 00031 }; 00032 // ------------------------------------------------------------------------- 00033 } // end of uniset namespace 00034 // ------------------------------------------------------------------------- 00035 #endif // USocket_H_ 00036 // -------------------------------------------------------------------------
1.7.6.1