suri-framework/trail

Fix Sock handlers to return a state

Open

#1 geöffnet am 23. Jan. 2024

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)OCaml (9 Forks)github user discovery
enhancementgood first issuehelp wanted

Repository-Metriken

Stars
 (44 Stars)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Currently they don't, and they should be closer to the return values used by Elixir's WebSock.ex:

@type handle_result() ::
  {:push, messages(), state()}
  | {:reply, term(), messages(), state()}
  | {:ok, state()}
  | {:stop, {:shutdown, :restart} | term(), state()}
  | {:stop, term(), close_detail(), state()}
  | {:stop, term(), close_detail(), messages(), state()}

Implementation notes

We can start with just push, ok, and stop.

Contributor Guide