|
@@ -23,8 +23,8 @@ int udp_connect_input(struct io *io) {
|
23
|
23
|
int on = 1;
|
24
|
24
|
setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
|
25
|
25
|
|
26
|
|
- /* Set receive buffer size to ~2.3MB or 6Mb/s for half a second */
|
27
|
|
- int bufsize = (6000000 / 1316) / 2;
|
|
26
|
+ /* Set receive buffer size to ~2.0MB */
|
|
27
|
+ int bufsize = (2000000 / 1316) * 1316;
|
28
|
28
|
setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (void *)&bufsize, sizeof(bufsize));
|
29
|
29
|
|
30
|
30
|
// subscribe to multicast group
|
|
@@ -68,8 +68,8 @@ int udp_connect_output(struct io *io) {
|
68
|
68
|
setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
|
69
|
69
|
set_sock_nonblock(sock);
|
70
|
70
|
|
71
|
|
- /* Set receive buffer size to ~2.3MB or 6Mb/s for half a second */
|
72
|
|
- int bufsize = (6000000 / 1316) / 2;
|
|
71
|
+ /* Set receive buffer size to ~2.0MB */
|
|
72
|
+ int bufsize = (2000000 / 1316) * 1316;
|
73
|
73
|
setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (void *)&bufsize, sizeof(bufsize));
|
74
|
74
|
|
75
|
75
|
// subscribe to multicast group
|