00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef __libutilxx__sella__net__SocketTrigger_H__
00010 #define __libutilxx__sella__net__SocketTrigger_H__
00011
00012 #include "../../common.h"
00013 #include "SocketPair.h"
00014
00015 #include <sys/types.h>
00016 #include <sys/socket.h>
00017
00018 namespace sella {
00019 namespace net {
00020 class SocketTrigger;
00021 }
00022 }
00023
00024 class sella::net::SocketTrigger : public SocketPair {
00025 public:
00026 typedef std::shared_ptr<SocketTrigger> shared;
00027 typedef SocketTrigger *ptr;
00028
00029 public:
00030 SocketTrigger() throw (SocketException);
00031 SocketTrigger(const SocketTrigger &sock) = delete;
00032 virtual ~SocketTrigger();
00033 void operator=(const SocketTrigger &sock) = delete;
00034
00035 UnixSocket::shared getSocket(void) const throw ();
00036
00037 int getFD(void) const;
00038
00039 void set(void) throw (SocketException);
00040 void clear(void) const throw (SocketException);
00041
00042 bool isSet(void) const throw (SocketException);
00043
00044 static const SocketTrigger::shared shared_ptr() throw (SocketException);
00045 };
00046
00047 #endif
00048
00049
00050
00051