Server on an isolate, dedicated server binary, room -> server (proto 5)
- serve(Map config, events) is the one server entrypoint: the app hosts it via Isolate.spawn (crash surfaced on the Host card, logs forwarded as [server]); bin/server.dart is the dedicated server, compiled into the bundle as watch-together-server. --headless gone. - Host identity via a per-hosting hostKey in hello, replacing the loopback heuristic. - Rename room -> server across code, files and wire (t:"state", /health name); protocol bumped to 5. - CI compiles the server binary; isolate smoke tests in server and desktop suites. Docs updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d8a0729029
commit
81cac1214d
48 files changed
+1073
-423
No files matched your search
@@ -37,10 +37,10 @@ void main() {
|
||||
timeout: const Timeout(Duration(minutes: 4)),
|
||||
() async {
|
||||
MediaKit.ensureInitialized();
|
||||
final server = RoomServer(const AppConfig(
|
||||
final server = SyncServer(const AppConfig(
|
||||
port: _port,
|
||||
secret: _secret,
|
||||
name: 'room',
|
||||
name: 'server',
|
||||
mediaPath: _mediaPath,
|
||||
));
|
||||
await server.start();
|
||||
@@ -67,10 +67,10 @@ void main() {
|
||||
reason: 'media must open paused, not autoplay');
|
||||
expect(viewer.playback.player.state.playing, isFalse);
|
||||
|
||||
await _poll(() => host.room.peek() != null, 'host room state');
|
||||
await _poll(() => host.serverState.peek() != null, 'host server state');
|
||||
host.toggleReady();
|
||||
await Future.delayed(const Duration(seconds: 5));
|
||||
expect(host.room.peek()?.transport, 'held',
|
||||
expect(host.serverState.peek()?.transport, 'held',
|
||||
reason: 'one Space with company present must not solo-play');
|
||||
expect(host.playback.player.state.playing, isFalse);
|
||||
expect(viewer.playback.player.state.playing, isFalse);
|
||||
@@ -78,7 +78,7 @@ void main() {
|
||||
viewer.toggleReady();
|
||||
await _poll(
|
||||
() =>
|
||||
host.room.peek()?.transport == 'playing' &&
|
||||
host.serverState.peek()?.transport == 'playing' &&
|
||||
viewer.playback.player.state.playing &&
|
||||
host.playback.player.state.playing,
|
||||
'both players playing once quorum readies',
|
||||
|
||||
Reference in new issue
Block a user