lipp / lua-websockets

Websockets for Lua.
http://lipp.github.com/lua-websockets/
MIT License
396 stars 113 forks source link

Do not force IPv6 addresses with LuaSocket >= 3 #39

Closed ntd closed 10 years ago

ntd commented 10 years ago

If socket.tcp6 was valorized (and this is the case on luasocket 3), the tools.bind helper function effectively forced the use of IPv6 addresses. The "ipv6-v6only" option diretly maps to IPV6_V6ONLY and it only affects the communication of an INET6 socket:

https://tools.ietf.org/html/rfc3493#section-5.3

The socket.bind API in LuaSocket 3 already handles inet and inet6 addresses, so there is no need for tools.bind:

https://github.com/diegonehab/luasocket/blob/v3.0-rc1/src/socket.lua#L27

lipp commented 10 years ago

@ntd Very nice! Thank you!