Document what is still TeamSpeak's in the seam and the real event order
link.rs and architecture.md now list every part of the ServerLink seam that still has TeamSpeak types or shape: ConnectOptions.identity and client_version, the account proof in LinkCtx, the u16 client ids, the Presence snapshots, and the stream vocabulary of voelin-stream (PeerConfig, MediaFrame, VideoFormat, VideoCodec, FrameSource). StreamAudioEnded joins the event list. Disconnected is no longer promised to be the last event: the stream task is a task of its own that winds down after the connection, so OwnStream(Ended) and StreamAudioEnded may follow it. The docs say TsLink ends the stream task as the connection's loop ends (usually before Disconnected, not always) and that the session does not depend on the order: it ends our stream and the watched audio itself on Disconnected and ignores what the link says after it. The reconnect order (StreamCmd::Shutdown before Disconnect) is documented too. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e0ac95ee79
commit
cfd9cba2dd
2 files changed
+72
-14
No files matched your search
+28
-5
@@ -107,7 +107,16 @@ task and returns:
|
||||
`Capabilities`, our client id, the server's unique id), `Presence` (a full
|
||||
snapshot each time), `OwnChannel`, `Chat`, `Poke`, `Audio` (a received
|
||||
`VoicePacket`), `Talking`, `OwnStream`, `StreamAudio` (the audio of a watched
|
||||
stream, for the audio thread's mixer), `Error` and, last, `Disconnected`.
|
||||
stream, for the audio thread's mixer), `StreamAudioEnded` (that stream's
|
||||
audio is over), `Error` and `Disconnected`. `Disconnected` ends the
|
||||
connection and is sent once, but it is not promised to be the last event:
|
||||
the stream task of a connection winds down after the connection, so its
|
||||
closing `OwnStream(Ended)` and `StreamAudioEnded` (and the bus events of
|
||||
its streams) may follow it. `TsLink` ends the stream task as the
|
||||
connection's loop ends, which usually puts them first, not always. The
|
||||
session does not depend on it: on `Disconnected` it ends our own stream and
|
||||
the audio of watched streams itself, and what the link says after that is
|
||||
ignored like the events of a replaced link.
|
||||
|
||||
Everything backend-neutral stays in `session.rs`: merging the three sources,
|
||||
the dedup of a message that arrives twice, the chat history, contacts, the
|
||||
@@ -136,10 +145,24 @@ in-process TeamSpeak gateway), and the QUIC transport of VoelinProtocol
|
||||
becomes the other implementation, both behind the backend-neutral
|
||||
`voelin_proto::link::Session` that the protocol spec defines (the spec
|
||||
replaces `voelin_core::link::ServerLink` by it, because the gateway
|
||||
implements the trait and the client depends on the gateway). What still has
|
||||
TeamSpeak types in the seam, and leaves with `TsLink`: the identity and
|
||||
version in `ConnectOptions`, the myTeamSpeak account proof in `LinkCtx`, and the
|
||||
peer and media vocabulary of the stream API (below).
|
||||
implements the trait and the client depends on the gateway). The seam is not
|
||||
backend-neutral yet. What still has TeamSpeak types, or TeamSpeak's shape, and
|
||||
changes when `TsLink` leaves:
|
||||
|
||||
- `ConnectOptions.identity` and `ConnectOptions.client_version`
|
||||
(`tsclientlib` types), and the myTeamSpeak account proof in `LinkCtx`
|
||||
(`myts_identity` of `tsproto`, `myts_data` of `tsclientlib`);
|
||||
- client ids are TeamSpeak's `u16`: our own in `Connected`, `Poke` and
|
||||
`Talking`, `LinkCmd::Poke`, a chat message's `author_id`, and the viewer
|
||||
and streamer ids of the stream API;
|
||||
- the `Presence` snapshots: `u16` client ids, `u64` channel and group ids,
|
||||
server and channel groups, talk power, icons, badges, the myTeamSpeak
|
||||
avatar;
|
||||
- the stream vocabulary of `voelin-stream` (the TeamSpeak 6 stream
|
||||
protocol): `PeerConfig` in `ConnectOptions.stream_peer`, `MediaFrame` in
|
||||
the frames of watched streams, `VideoFormat` in `StreamCmd::VideoFrame`,
|
||||
and `VideoCodec` and `FrameSource`, which `voelin_core::stream`
|
||||
re-exports with them (see Streams, below).
|
||||
|
||||
## What the engine tells of the server's software
|
||||
|
||||
|
||||
Reference in new issue
Block a user