suri-framework/trail

Fix Sock handlers to return a state

Open

#1 aperta il 23 gen 2024

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)OCaml (9 fork)github user discovery
enhancementgood first issuehelp wanted

Metriche repository

Star
 (44 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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.

Guida contributor