Modify server to use IPv6
This commit is contained in:
parent
bf5f517e85
commit
5ae2b992ef
@ -22,7 +22,7 @@ child_spec(Port) ->
|
||||
modules => [?MODULE]}.
|
||||
|
||||
init([Port]) ->
|
||||
{ok, Socket} = gen_tcp:listen(Port, [binary, {active, true}]),
|
||||
{ok, Socket} = gen_tcp:listen(Port, [binary, inet6, {active, true}]),
|
||||
Pid = spawn_link(fun() -> acceptor_loop(Socket) end),
|
||||
{ok, #state{socket = Socket, acceptor = Pid}}.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user