Websockets ++ working using port 6060 but not using port 8080.

733 views
Skip to first unread message

never...@gmail.com

unread,
Jun 13, 2014, 9:39:44 PM6/13/14
to webso...@googlegroups.com
We have recently made the decision to use websockets++ instead of our own implementation of websockets. We updated all our code, and it works fine on our linux computer and Chrome web-browser over port 6060. However, when we built the code and installed it in our hardware box (which also uses the Chrome browser), it doesn't work. We have always traditionally used port 8080 for our hardware boxes, and it works fine using our own implementation of websockets. But with websockets++ we are getting the following error:

[2014-06-14 00:17:47] [info] asio listen error: system:97 (Address family not supported by protocol)

terminate called after throwing an instance of 'boost::system::error_code'

Has anyone seen this problem before, or have any idea what might be going on?

Peter Thorson

unread,
Jun 14, 2014, 12:25:31 AM6/14/14
to never...@gmail.com, webso...@googlegroups.com
The first thing I'd look at here is whether your hardware box has an IPv6 stack. By default, WebSocket++ listens in a dual stack IPv4/IPv6 mode. It will fail with address family related errors if an IPv6 stack is not available. The best, and future proof, solution if this is the issue is to enable IPv6 on your target. A quick and dirty solution is to use one of the endpoint::listen overloads that lets you specify an address family to listen on and manually select to listen only via IPv4.
--
You received this message because you are subscribed to the Google Groups "WebSocket++" group.
To unsubscribe from this group and stop receiving emails from it, send an email to websocketpp...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

never...@gmail.com

unread,
Jul 21, 2014, 5:29:42 PM7/21/14
to webso...@googlegroups.com

Thanks for your reply. The hardware box did not have an IPv6 stack. We were able to successfullly run with IPv4 only using the endpoint::listen function overload, and we also have tasked the makers of the box to update to IPv6, which they are working on now.
Reply all
Reply to author
Forward
0 new messages