mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-04-22 08:24:35 +02:00
Add rcvbuf size to socket
This commit is contained in:
@@ -59,6 +59,15 @@ void UdpReceiver::bind(const uint16_t port, const size_t usec_timeout)
|
||||
SO_RCVTIMEO,
|
||||
(const char*)&udp_socket_timeout,
|
||||
sizeof(struct timeval));
|
||||
|
||||
// 12MB
|
||||
int rcvbuf_n_bytes = 12 * 1024 * 1024;
|
||||
setsockopt(
|
||||
socket_fd_,
|
||||
SOL_SOCKET,
|
||||
SO_RCVBUF,
|
||||
&rcvbuf_n_bytes,
|
||||
sizeof(rcvbuf_n_bytes));
|
||||
}
|
||||
|
||||
bool UdpReceiver::receive(void* buffer, size_t buffer_n_bytes)
|
||||
|
||||
Reference in New Issue
Block a user