suri-framework/trail

Fix Sock handlers to return a state

Open

#1 ouverte le 23 janv. 2024

Voir sur GitHub
 (0 commentaires) (0 réactions) (0 assignés)OCaml (9 forks)github user discovery
enhancementgood first issuehelp wanted

Métriques du dépôt

Stars
 (44 stars)
Métriques de merge PR
 (Métriques PR en attente)

Description

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.

Guide contributeur