[Test] working on jetson
This commit is contained in:
parent
011c463ea9
commit
8efbd54352
@ -24,10 +24,6 @@ int sockfd = 0;
|
||||
void clean_up(int signum) {
|
||||
if (sockfd == -1) exit(1);
|
||||
|
||||
int truthy = 1;
|
||||
setsockopt(sockfd, SOL_SOCKET, SO_REUSEPORT, &truthy, sizeof(int));
|
||||
setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &truthy, sizeof(int));
|
||||
|
||||
shutdown(sockfd, SHUT_RDWR);
|
||||
close(sockfd);
|
||||
|
||||
@ -59,6 +55,10 @@ int main(int argc, char const *argv[]) {
|
||||
exit(errno);
|
||||
}
|
||||
|
||||
int truthy = 1;
|
||||
setsockopt(sockfd, SOL_SOCKET, SO_REUSEPORT, &truthy, sizeof(int));
|
||||
setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &truthy, sizeof(int));
|
||||
|
||||
// setup server info
|
||||
bzero(&client_info, sizeof(client_info));
|
||||
client_info.sin_family = PF_INET;
|
||||
|
Loading…
x
Reference in New Issue
Block a user