FedecksServer.Socket (fedecks_server v0.1.1)

Sets up a Phoenix.Socket.Transport that connects to a Fedecks Websocket client


In your endpoint call the macro fedecks_socket/2 eg

defmodule MyApp.Endpoint
  use Phoenix.Endpoint, otp_app: :my_app

  import FedecksServer.Socket, only: [fedecks_socket: 1]


Link to this section Summary


Included in your Endpoint. Note

Link to this section Functions

Link to this macro

fedecks_socket(path \\ "/fedecks", handler)

@spec fedecks_socket(path :: String.t(), handler_module :: atom()) :: term()

Included in your Endpoint. Note:

  • path defaults to "/fedecks". The actual endpoint path will have "/websocket" appended by Phoenix, so the default is really "/fedecks/websocket".
  • The handler should be a module that implements FedecksServer.FedecksHandler.