vrmodel
diff src/inpclient.cc @ 5:9e260c091f75
wrote some server code in the test input tool
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 15 Sep 2014 10:57:31 +0300 |
parents | a32b151fb3c6 |
children |
line diff
1.1 --- a/src/inpclient.cc Thu Sep 11 00:08:23 2014 +0300 1.2 +++ b/src/inpclient.cc Mon Sep 15 10:57:31 2014 +0300 1.3 @@ -121,17 +121,6 @@ 1.4 } 1.5 setsockopt(s, SOL_SOCKET, SO_BROADCAST, &true_val, sizeof true_val); 1.6 1.7 - memset(&sa, 0, sizeof sa); 1.8 - sa.sin_family = AF_INET; 1.9 - sa.sin_port = htons(opt_dport); 1.10 - sa.sin_addr.s_addr = htonl(INADDR_ANY); 1.11 - 1.12 - if(bind(s, (struct sockaddr*)&sa, sizeof sa) == -1) { 1.13 - perror("failed to bind datagram socket"); 1.14 - close(s); 1.15 - return -1; 1.16 - } 1.17 - 1.18 do { 1.19 fd_set rdset; 1.20