mirror of
https://github.com/WiVRn/WiVRn.git
synced 2026-11-26 20:06:42 -08:00
Set send buffer size
This commit is contained in:
1 parent
1dfea4061a
commit
bd8183bbd2
3 files changed
+7
No files matched your search
@@ -133,6 +133,11 @@ void xrt::drivers::wivrn::UDP::set_receive_buffer_size(int size)
|
||||
setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &size, sizeof(size));
|
||||
}
|
||||
|
||||
void xrt::drivers::wivrn::UDP::set_send_buffer_size(int size)
|
||||
{
|
||||
setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &size, sizeof(size));
|
||||
}
|
||||
|
||||
void xrt::drivers::wivrn::UDP::set_tos(int tos)
|
||||
{
|
||||
int err = setsockopt(fd, IPPROTO_IP, IP_TOS, &tos, sizeof(tos));
|
||||
|
||||
@@ -97,6 +97,7 @@ public:
|
||||
void subscribe_multicast(in6_addr address);
|
||||
void unsubscribe_multicast(in6_addr address);
|
||||
void set_receive_buffer_size(int size);
|
||||
void set_send_buffer_size(int size);
|
||||
void set_tos(int type_of_service);
|
||||
};
|
||||
|
||||
|
||||
@@ -75,6 +75,7 @@ wivrn_connection::wivrn_connection(TCP && tcp) :
|
||||
int client_port = htons(peer_addr.sin6_port);
|
||||
stream.connect(peer_addr.sin6_addr, client_port);
|
||||
U_LOG_D("Stream socket connected, client port %d", client_port);
|
||||
stream.set_send_buffer_size(1024 * 1024 * 5);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user