diff options
author | kballou <kballou@devnulllabs.io> | 2017-11-24 10:16:06 -0700 |
---|---|---|
committer | kballou <kballou@devnulllabs.io> | 2017-11-24 10:22:44 -0700 |
commit | 9bae951c555f9c25876968fa98853253b7007a0f (patch) | |
tree | 9bdae36c1344d5c9d4d667bb218b729340d0ed90 /lib/octonetcat/accepter.ex | |
parent | 3af086d168975a4122cee80c955da03516f55571 (diff) | |
download | octonetcat-9bae951c555f9c25876968fa98853253b7007a0f.tar.gz octonetcat-9bae951c555f9c25876968fa98853253b7007a0f.tar.xz |
Level up the Echo Server0.3.0
This should enable the upgrade process to retain connections
- Replace our simple task supervisor with a custom `simple_one_for_one`
supervisor
- Upgrade the echo server to use a `GenServer` behaviour
Diffstat (limited to 'lib/octonetcat/accepter.ex')
-rw-r--r-- | lib/octonetcat/accepter.ex | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/octonetcat/accepter.ex b/lib/octonetcat/accepter.ex index a398676..9a570c1 100644 --- a/lib/octonetcat/accepter.ex +++ b/lib/octonetcat/accepter.ex @@ -18,11 +18,7 @@ defmodule Octonetcat.Accepter do {:ok, client} = :gen_tcp.accept(socket) Logger.info("Accepted connection") Logger.info("Passing to Echo Server") - {:ok, pid} = Task.Supervisor.start_child( - Octonetcat.TaskSupervisor, - Octonetcat.Echo, - :serve, - [client]) + {:ok, pid} = Octonetcat.ServerSupervisor.start_server(client) :ok = :gen_tcp.controlling_process(client, pid) loop_accepter(socket) end |