<erl> out(A) -> Host = (A#arg.headers)#headers.host, {abs_path, Path} = (A#arg.req)#http_request.path, EndpointPath = filename:dirname(Path) ++ "websockets_example_endpoint.yaws", WebSocketLocation = Host ++ EndpointPath, Body = html_body(WebSocketLocation), {content, "text/html", Body}. %% this html was copied from the basic example in %% https://github.com/davebryson/erlang_websocket/ html_body(WebSocketLocation) -> "

# Basic Echo Example

- Sending \"bye\" closes the connection.
- Sending \"say hi later\" sends \"hi there!\" asynchronously.
- Sending \"fragmented message\" sends \"frag1frag2frag2\".
- Sending \"something\" does nothing.
- Other messages are echoed.

Use extended version
Enable keepalive timer
KeepAlive timeout (in milliseconds)
Say Something:
". </erl>