class Socket {
public:
- Socket(std::string path, bool is_client = true);
- Socket(int fd, bool is_client = true);
+ Socket(std::string path);
+ Socket(int fd);
virtual ~Socket();
int Send(const void* buf, unsigned int len);
int Connect();
int GetFd();
+ void SetTimeout(int timesec);
std::string GetPath();
private:
private:
std::string path_;
int fd_;
- bool is_client_;
struct sockaddr_un addr_ = { 0, };
};