]> code.delx.au - pulseaudio/blob - src/protocol-native-tcp.c
b33f3e15b8d179fbd8261eb46ce789950258c6ec
[pulseaudio] / src / protocol-native-tcp.c
1 #include "module.h"
2
3 int module_init(struct core *c, struct module*m) {
4 struct socket_server *s;
5 assert(c && m);
6
7 if (!(s = socket_server_new_ipv4(c->mainloop, INADDR_LOOPBACK, 4711)))
8 return -1;
9
10 m->userdata = protocol_native_new(s);
11 assert(m->userdata);
12 return 0;
13 }
14
15 void module_done(struct core *c, struct module*m) {
16 assert(c && m);
17
18 protocol_native_free(m->userdata);
19 }