Questions about XCB using domain sockets.
xc haze <[email protected]>
| Newsgroups | gmane.comp.freedesktop.xcb |
|---|---|
| Message-ID | <CAD7HKXFv5bEp2_vQ-XRu=X6-yHFSTEwwzf-3zEiJRDa3pJ2=2g@mail.gmail.com> |
Hi:
When I look at XCB communication,
static int _xcb_open_abstract(char *protocol, const char *file, size_t
filelen)
{
int fd;
struct sockaddr_un addr = {0};
socklen_t namelen;
if (protocol && strcmp("unix",protocol))
return -1;
strcpy(addr.sun_path + 1, file);
addr.sun_family = AF_UNIX;
namelen = offsetof(struct sockaddr_un, sun_path) + 1 + filelen;
。。。。。。
}
Why do we add one to addr->sun_path?
_______________________________________________
Xcb mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/xcb