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