support ipv6
This commit is contained in:
parent
527cd1c5f3
commit
3a2abc58e8
1 changed files with 5 additions and 5 deletions
10
fbflut.c
10
fbflut.c
|
@ -129,13 +129,13 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
|
|
||||||
int socket_desc, client_sock, c;
|
int socket_desc, client_sock, c;
|
||||||
struct sockaddr_in server, client;
|
struct sockaddr_in6 server, client;
|
||||||
|
|
||||||
socket_desc = socket(AF_INET, SOCK_STREAM, 0);
|
socket_desc = socket(AF_INET6, SOCK_STREAM, 0);
|
||||||
|
|
||||||
server.sin_family = AF_INET;
|
server.sin6_family = AF_INET6;
|
||||||
server.sin_addr.s_addr = INADDR_ANY;
|
server.sin6_addr = in6addr_any;
|
||||||
server.sin_port = htons(port);
|
server.sin6_port = htons(port);
|
||||||
|
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
tv.tv_sec = 60;
|
tv.tv_sec = 60;
|
||||||
|
|
Loading…
Reference in a new issue