mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-21 18:26:06 -05:00
[httpd] Main commit that adds multithreading to httpd
Also refactor streaming implementation to make it more like an output and to let the design support multithreading.
This commit is contained in:
@@ -317,6 +317,11 @@ net_bind(short unsigned *port, int type, const char *log_service_name)
|
||||
if (fd < 0)
|
||||
continue;
|
||||
|
||||
// Makes us able to attach multiple threads to the same port
|
||||
ret = setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &yes, sizeof(yes));
|
||||
if (ret < 0)
|
||||
continue;
|
||||
|
||||
// TODO libevent sets this, we do the same?
|
||||
ret = setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &yes, sizeof(yes));
|
||||
if (ret < 0)
|
||||
|
||||
Reference in New Issue
Block a user