Closed eshurakov closed 3 years ago
This PR adds the ability to listen on all interfaces.
Addr which is passed to gen_tcp:listen can be one of:
Addr
gen_tcp:listen
socket_address() = ip_address() | any | loopback | local_address()
In this PR I'm converting "*" hostname to any, which is then passed to gen_tcp:listen and makes it to listen on all interfaces.
any
Example:
{ok, Socket} = chumak:socket(router), {ok, Peer} = chumak:bind(Socket, tcp, "*", 4000)
This PR adds the ability to listen on all interfaces.
Addr
which is passed togen_tcp:listen
can be one of:In this PR I'm converting "*" hostname to
any
, which is then passed togen_tcp:listen
and makes it to listen on all interfaces.Example: