scrcpy/app/src/netutil.h
Romain Vimont eb09fefd43 Timeout the server socket connection
Wait no more than 2 seconds for accepting the connection from the
device, since it blocks the event loop, preventing to react to SIGTERM
(Ctrl+C).
2018-02-09 16:21:10 +01:00

9 lines
188 B
C

#ifndef NETUTIL_H
#define NETUTIL_H
#include <SDL2/SDL_net.h>
// blocking accept on the server socket
TCPsocket server_socket_accept(TCPsocket server_socket, Uint32 timeout_ms);
#endif