Skip to content

Commit

Permalink
add more server docs
Browse files Browse the repository at this point in the history
  • Loading branch information
benknoble committed May 9, 2023
1 parent 9a054d1 commit aae0894
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions scribblings/reference.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
frosthaven-manager/gui/monsters
frosthaven-manager/gui/player-info
frosthaven-manager/gui/render
frosthaven-manager/gui/server
frosthaven-manager/gui/stacked-tables
frosthaven-manager/gui/start
frosthaven-manager/gui/static-table
Expand All @@ -51,6 +52,7 @@
frosthaven-manager/observable-operator
frosthaven-manager/qi
frosthaven-manager/qi/list2hash
(prefix-in server: frosthaven-manager/server)
(only-in frosthaven-manager/syntax/module-reader)
frosthaven-manager/syntax/monsters
))
Expand Down Expand Up @@ -1002,6 +1004,7 @@ The following sections describe modules under @tt{frosthaven-manager/gui}.
@defthing[contribute-menu-item (-> (is-a?/c view<%>))]
@defthing[send-feedback-menu-item (-> (is-a?/c view<%>))]
@defthing[how-to-play-menu-item (-> (is-a?/c view<%>))]
@defthing[launch-server-menu-item (-> (is-a?/c view<%>))]
)]{
Menu items for Frosthaven Manager.
}
Expand Down Expand Up @@ -1500,6 +1503,15 @@ on whether window A or window B was closed first. Note also the use of
}
}

@subsection{@tt{gui/server}}
@defmodule[frosthaven-manager/gui/server]

@defproc[(launch-server [s state?]) renderer?]{
Renders a window in a new closing eventspace with server information, and
launches a server. See @racket[with-closing-custodian/eventspace] and
@racket[server:launch-server].
}

@subsection{@tt{gui/stacked-tables}}
@defmodule[frosthaven-manager/gui/stacked-tables]

Expand Down Expand Up @@ -1794,6 +1806,18 @@ Transforms @racket[xs] to a hash by mapping each element into a key via
@racket[->key] and a value via @racket[->value].
}

@section{@tt{server}}
@defmodule[frosthaven-manager/server]

@defproc[(launch-server [s state?] [send-event procedure?])
(values string? (-> any))]{
Launches the actual web server for @racket[s]. The callback protocol for
@racket[send-event] is not yet formalized and very unstable.

Returns the server address (on a best-guess basis) and a @code{stop} procedure
that stops the server when called.
}

@section{@tt{syntax}}

The modules in this collection provide helpers for macros, syntax, and
Expand Down

0 comments on commit aae0894

Please sign in to comment.