summaryrefslogtreecommitdiffstats
path: root/src/socket-server.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-06-30 00:00:52 +0000
committerLennart Poettering <lennart@poettering.net>2004-06-30 00:00:52 +0000
commit961fb4466a9396a11f1a9a6e7d4193409b8949d6 (patch)
treef715643d1c226b1063be40ed0f78a4511b26c67d /src/socket-server.c
parentd571be6f5109ff5b256e4c14f391c916264f0a8e (diff)
latency
esound volume changing git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@43 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/socket-server.c')
-rw-r--r--src/socket-server.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/socket-server.c b/src/socket-server.c
index 87fe1476..bd590f3c 100644
--- a/src/socket-server.c
+++ b/src/socket-server.c
@@ -11,6 +11,7 @@
#include <arpa/inet.h>
#include "socket-server.h"
+#include "util.h"
struct socket_server {
int fd;
@@ -39,6 +40,9 @@ static void callback(struct pa_mainloop_api *mainloop, void *id, int fd, enum pa
return;
}
+ /* There should be a check for socket type here */
+ make_tcp_socket_low_delay(fd);
+
io = iochannel_new(s->mainloop, nfd, nfd);
assert(io);
s->on_connection(s, io, s->userdata);
@@ -78,6 +82,8 @@ struct socket_server* socket_server_new_unix(struct pa_mainloop_api *m, const ch
strncpy(sa.sun_path, filename, sizeof(sa.sun_path)-1);
sa.sun_path[sizeof(sa.sun_path) - 1] = 0;
+ make_socket_low_delay(fd);
+
if (bind(fd, (struct sockaddr*) &sa, SUN_LEN(&sa)) < 0) {
fprintf(stderr, "bind(): %s\n", strerror(errno));
goto fail;
@@ -117,6 +123,8 @@ struct socket_server* socket_server_new_ipv4(struct pa_mainloop_api *m, uint32_t
if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) < 0)
fprintf(stderr, "setsockopt(): %s\n", strerror(errno));
+
+ make_tcp_socket_low_delay(fd);
sa.sin_family = AF_INET;
sa.sin_port = htons(port);