| 38 | } |
| 39 | |
| 40 | void UnixSocket::Connect(const String& path) |
| 41 | { |
| 42 | sockaddr_un s_un; |
| 43 | memset(&s_un, 0, sizeof(s_un)); |
| 44 | s_un.sun_family = AF_UNIX; |
| 45 | strncpy(s_un.sun_path, path.CStr(), sizeof(s_un.sun_path)); |
| 46 | s_un.sun_path[sizeof(s_un.sun_path) - 1] = '\0'; |
| 47 | |
| 48 | if (connect(GetFD(), (sockaddr *)&s_un, SUN_LEN(&s_un)) < 0 && errno != EINPROGRESS) { |
| 49 | BOOST_THROW_EXCEPTION(posix_error() |
| 50 | << boost::errinfo_api_function("connect") |
| 51 | << boost::errinfo_errno(errno)); |
| 52 | } |
| 53 | } |
| 54 | #endif /* _WIN32 */ |
nothing calls this directly
no test coverage detected