mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-11-15 08:33:54 +01:00
C++ style settings
This commit is contained in:
1 parent
b795da8a2f
commit
be0425fbfe
1 file changed
+2
-2
@@ -44,12 +44,12 @@ void UdpReceiver::bind(const uint16_t port)
|
||||
throw runtime_error("Cannot bind socket.");
|
||||
}
|
||||
|
||||
struct timeval udp_socket_timeout;
|
||||
timeval udp_socket_timeout;
|
||||
udp_socket_timeout.tv_sec = 0;
|
||||
udp_socket_timeout.tv_usec = BUFFER_UDP_US_TIMEOUT;
|
||||
|
||||
if (setsockopt(socket_fd_, SOL_SOCKET, SO_RCVTIMEO,
|
||||
(const char*)&udp_socket_timeout, sizeof(struct timeval) == -1)) {
|
||||
&udp_socket_timeout, sizeof(timeval)) == -1) {
|
||||
throw runtime_error(
|
||||
"Cannot set SO_RCVTIMEO. " + string(strerror(errno)));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user