pulse-server: implement module-native-protocol-tcp

The module creates a tcp server on the given ip/port pair.
This commit is contained in:
Wim Taymans 2021-04-09 18:27:30 +02:00
parent 378f655a3d
commit 33ddd5f760
3 changed files with 132 additions and 2 deletions

View file

@ -294,6 +294,9 @@ struct impl {
/* Functions that modules can use */
static void broadcast_subscribe_event(struct impl *impl, uint32_t mask, uint32_t event, uint32_t id);
static struct server *create_server(struct impl *impl, char *address);
static void server_free(struct server *server);
#include "collect.c"
#include "module.c"
#include "message-handler.c"
@ -5920,6 +5923,10 @@ on_connect(void *data, int fd, uint32_t mask)
if (client->props == NULL)
goto error;
pw_properties_setf(client->props,
"pulse.server.type", "%s",
server->type == SERVER_TYPE_INET ? "tcp" : "unix");
client->routes = pw_properties_new(NULL, NULL);
if (client->routes == NULL)
goto error;