Skip to content

Commit

Permalink
Add a timeout argument to TCPClient.
Browse files Browse the repository at this point in the history
  • Loading branch information
stuart-auterion committed Jun 7, 2024
1 parent d4b8889 commit ba647ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/mav/TCPClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ namespace mav {
if (timeout > 0) {
struct timeval send_timeout;
send_timeout.tv_sec = 0;
send_timeout.tv_usec = timeout;
send_timeout.tv_usec = timeout * 1000; // timeout is in ms
setsockopt(_socket, SOL_SOCKET, SO_SNDTIMEO, &send_timeout, sizeof(send_timeout));
}

Expand Down

0 comments on commit ba647ef

Please sign in to comment.