Current section

Files

Jump to
thousand_island lib thousand_island handlers echo.ex
Raw

lib/thousand_island/handlers/echo.ex

defmodule ThousandIsland.Handlers.Echo do
@moduledoc """
A sample Handler implementation of the Echo protocol
https://en.wikipedia.org/wiki/Echo_Protocol
"""
use ThousandIsland.Handler
@impl ThousandIsland.Handler
def handle_data(data, socket, state) do
ThousandIsland.Socket.send(socket, data)
{:ok, :continue, state}
end
end