suri-framework/trail

Fix Sock handlers to return a state

Open

#1 opened on 2024年1月23日

GitHub で見る
 (0 comments) (0 reactions) (0 assignees)OCaml (9 forks)github user discovery
enhancementgood first issuehelp wanted

Repository metrics

Stars
 (44 stars)
PR merge metrics
 (PR metrics pending)

説明

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.

コントリビューターガイド