Repository navigation
Commit 9d4e802
committed
AUS-1016: document the embedded-host patterns and add samples/EmbeddedHost
The API usability review (docs/reviews/2026-09-28_api-usability-review.md)
found that every host outside ASP.NET Core rediscovers the same things: a
guest process needs a session of its own, the raw-connection reply stream
carries no framing, JsonFramer returns -1 for two different conditions,
application error codes belong outside the reserved range, the cancellation
token may sit between JSON parameters, and there is no dispatch context for
a thread that owns the state.
samples/EmbeddedHost is three hosts over one service, each about a page:
HttpListener (body limit, deadline, 204 for notifications), any Stream with
newline-delimited documents and a separate write loop (named pipe in the
sample), and a SynchronizationContext that runs every document on one
thread. Its check mode runs all three against a client. The project is in
the solution and the sample README is a page on the documentation site.
README: sessions guidance leads with a named session for guests; the hosting
section gains the embedded subsection and the framer's -1 semantics; the raw
connection sections state that replies carry no newline or Content-Length;
the -32000 examples become application codes with the reason; unknown named
members, the token's position, the public read path for bound methods
(MetaData.Services), the adapter pattern for the context, and the AOT
constraint are documented where a reader meets them.1 parent 4fd96dd commit 9d4e802
14 files changed
Lines changed: 626 additions & 12 deletions
File tree
- .github/workflows
- AustinHarris.JsonRpc.AspNetCore
- samples/EmbeddedHost
- site
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
142 | 145 | | |
143 | 146 | | |
144 | 147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
175 | 177 | | |
176 | 178 | | |
177 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
178 | 200 | | |
179 | 201 | | |
180 | 202 | | |
181 | 203 | | |
182 | 204 | | |
183 | 205 | | |
| 206 | + | |
184 | 207 | | |
185 | 208 | | |
186 | 209 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
0 commit comments