Skip to content

Instantly share code, notes, and snippets.

@cheeyeo
Created August 4, 2014 19:05
Show Gist options
  • Save cheeyeo/93b9f71720af45dec486 to your computer and use it in GitHub Desktop.
Save cheeyeo/93b9f71720af45dec486 to your computer and use it in GitHub Desktop.
Raw websockets in elixir
# You can wire up a cowboy specific websocket handler with the following:
defmodule MyRouter do
use Phoenix.Router
dispatch_option "/ws", MyCowboyWebsocketHandler
end
defmodule MyCowboyWebsocketHandler do
@behaviour :cowboy_websocket_handler
# implement the cowboy websocket behavior
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment