1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

Support for abstract socket

This commit is contained in:
Yeonjun Lim 2016-04-10 13:19:16 +09:00 committed by Andy Green
parent 3c6a8c1a24
commit 44182452c8
2 changed files with 6 additions and 1 deletions

View file

@ -1513,6 +1513,9 @@ lws_socket_bind(struct lws_context *context, int sockfd, int port,
return -1;
}
strcpy(serv_unix.sun_path, iface);
if (serv_unix.sun_path[0] == '@')
serv_unix.sun_path[0] = '\0';
} else
#endif
#ifdef LWS_USE_IPV6

View file

@ -1375,7 +1375,9 @@ struct lws_protocol_vhost_options {
* @iface: NULL to bind the listen socket to all interfaces, or the
* interface name, eg, "eth2"
* If options specifies LWS_SERVER_OPTION_UNIX_SOCK, this member is
* the pathname of a UNIX domain socket.
* the pathname of a UNIX domain socket. you can use the UNIX domain
* sockets in abstract namespace, by prepending an @ symbole to the
* socket name.
* @protocols: Array of structures listing supported protocols and a protocol-
* specific callback for each one. The list is ended with an
* entry that has a NULL callback pointer.