Commit 9ac67aed authored by Jean-Paul Saman's avatar Jean-Paul Saman

src/network/udp.c: enlarge socket buffers to 1 second at 8Mbps

parent 02650b60
...@@ -686,9 +686,9 @@ int __net_ConnectDgram( vlc_object_t *p_this, const char *psz_host, int i_port, ...@@ -686,9 +686,9 @@ int __net_ConnectDgram( vlc_object_t *p_this, const char *psz_host, int i_port,
#if !defined( SYS_BEOS ) #if !defined( SYS_BEOS )
/* Increase the receive buffer size to 1/2MB (8Mb/s during 1/2s) /* Increase the receive buffer size to 1/2MB (8Mb/s during 1/2s)
* to avoid packet loss caused by scheduling problems */ * to avoid packet loss caused by scheduling problems */
setsockopt (fd, SOL_SOCKET, SO_RCVBUF, &(int){ 0x80000 }, sizeof (int)); setsockopt (fd, SOL_SOCKET, SO_RCVBUF, &(int){ 0x160000 }, sizeof (int));
setsockopt (fd, SOL_SOCKET, SO_SNDBUF, &(int){ 0x80000 }, sizeof (int)); setsockopt (fd, SOL_SOCKET, SO_SNDBUF, &(int){ 0x160000 }, sizeof (int));
/* Allow broadcast sending */ /* Allow broadcast sending */
setsockopt (fd, SOL_SOCKET, SO_BROADCAST, &(int){ 1 }, sizeof (int)); setsockopt (fd, SOL_SOCKET, SO_BROADCAST, &(int){ 1 }, sizeof (int));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment