Running the application from local:
PORT=8888 iex -S mix
Connecting from client with:
telnet 127.0.0.1 8888
Try connecting with multiple clients and send some messages, you'll see an echo.
If available in Hex, the package can be installed
by adding tcp_server
to your list of dependencies in mix.exs
:
def deps do
[
{:tcp_server, "~> 0.1.0"}
]
end
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/tcp_server.