FedecksServer.Socket (fedecks_server v0.1.1)

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

Usage:

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]

  fedecks_socket(MyApp.SocketHandler)
end

Link to this section Summary

Functions

Included in your Endpoint. Note

Link to this section Functions

Link to this macro

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

(macro)
@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.