[Libwebsockets] Filtering on client IP
thomas.spitz at hestia-france.com
Thu Jan 2 15:14:45 CET 2014
Is there someone who tried to filter client connection using their IP
(using white and/or black list approach).
In test-server.c I have uncommented the following line
> libwebsockets_get_peer_addresses(context, wsi, (int)(long)in, client_name,
> sizeof(client_name), client_ip, sizeof(client_ip));
> fprintf(stderr, "Received network connect from %s (%s)\n", client_name,
But all I get is :
> gethostbyaddr: Connection refused
> Received network connect from ()
It seems that this line
> host = gethostbyaddr((char *) &sin.sin_addr,
> sizeof(sin.sin_addr), AF_INET);
always returns NULL..
I haven't investigate much yet...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libwebsockets