Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unix Domain Sockets support for websockets listener #2941

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
websockets.c: checking if compiled with unix doman sockets support
Signed-off-by: Oleg Kisseloff <[email protected]>
  • Loading branch information
okisseloff committed Nov 20, 2023
commit cf15a8066adde08dc3345f5cb0fede8a7458a2d3
5 changes: 5 additions & 0 deletions src/websockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -688,8 +688,13 @@ void mosq_websockets_init(struct mosquitto__listener *listener, const struct mos

memset(&info, 0, sizeof(info));
if(listener->port == 0){
#ifdef WITH_UNIX_SOCKETS
info.iface = listener->unix_socket_path;
info.options |= LWS_SERVER_OPTION_UNIX_SOCK;
#else
log__printf(NULL, MOSQ_LOG_ERR, "Unix Domain Sockets are disabled");
return;
#endif
}else{
info.iface = listener->host;
}
Expand Down