simple-socket library 1.1.5

UnixSocket.h

Go to the documentation of this file.
00001 #ifndef NET_UnixSocket_h__
00002 #define NET_UnixSocket_h__
00003 
00004 #include "SimpleSocket.h"
00005 
00006 struct sockaddr_un;
00007 
00008 namespace NET
00009 {
00011     class UnixSocket : public SimpleSocket
00012     {
00013     public:
00019         void connect( const std::string& foreignPath);
00020 
00026         void bind( const std::string& localPath);
00027 
00033         std::string getLocalPath() const;
00034 
00040         std::string getForeignPath() const;
00041 
00042     protected:
00044         UnixSocket( int type, int protocol);
00045 
00054         static void fillAddress( const std::string& path, sockaddr_un& addr);
00055 
00057         static std::string extractPath( const sockaddr_un& addr, socklen_t len);
00058     };
00059 
00060 } // namespace NET
00061 
00062 #endif // NET_UnixSocket_h__