gitoria

notes

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Branchmainc028ac61Merge branch 'notes-pr7-kunibert' into mainAtlasmain/plugins/http1/tests/two-ws-servers.hl

1015 B

  1. // Fixture for two-ws-servers.mjs: independently owned handlers and broadcasts.
  2. import { NativeWebSocketServer, Response } from 'hl:http1'
  3. import { env } from 'hl:proc'
  4. base = toNumber(env('HL_TEST_PORT'))
  5. a = new NativeWebSocketServer(port = base, host = '127.0.0.1')
  6. b = new NativeWebSocketServer(port = base + 1, host = '127.0.0.1')
  7. closedA = 0
  8. closedB = 0
  9. on a.connect(peer) { peer.send('open:A') }
  10. on b.connect(peer) { peer.send('open:B') }
  11. on a.message(peer, String data) { peer.send('A:' + data) }
  12. on b.message(peer, String data) { peer.send('B:' + data) }
  13. on a.close(peer) { closedA = closedA + 1 }
  14. on b.close(peer) { closedB = closedB + 1 }
  15. on a.request(req) {
  16. if (req.path == '/broadcast') { return new Response('' + a.broadcast('broadcast:A')) }
  17. if (req.path == '/stop') { a.close() }
  18. return new Response('' + closedA + ':' + closedB)
  19. }
  20. on b.request(req) {
  21. if (req.path == '/broadcast') { return new Response('' + b.broadcast('broadcast:B')) }
  22. return new Response('' + closedA + ':' + closedB)
  23. }

Branches

Latest commits

  • c028ac61Merge branch 'notes-pr7-kunibert' into mainAtlas
  • 9cc92bdfKeep conflict and history fixes while awaiting queued save supportAtlas
  • a5c27cb6Allow real edits back to earlier text and honor configured identAtlas
  • 15c46ced|||PR Preserve note edits, conflict bases and visible historyAtlas
  • 4c6e0bf6Merge branch 'notes13-day61' into mainAtlas
  • eb51864f|||PR Back/Forward via navigate, server drafts, Hybriel day61Atlas
  • 3537cf7eMerge branch 'vendor-day59' into mainAtlas
  • c13d188b|||PR Vendor Hybriel day59Atlas
  • 24c95433Merge branch 'notes17-ghost-note' into mainAtlas
  • ae1075b2Preserve rejected drafts during note ID adoptionAtlas
  • 383cce23|||PR Prevent saved local edits from restoring deleted notesAtlas
  • 99ca1cf6Merge branch 'vendor-day56' into mainAtlas
  • 649cef37|||PR Vendor Hybriel day56Atlas
  • aadd0abcMerge branch 'hl-standard-2' into mainAtlas
  • 52ffac9f|||PR Keyboard and reload checks for the notes gate (HL-STANDARD F21, F5)Atlas
  • 617ee8c0Merge branch 'hl-standard' into mainAtlas
  • 452458ee|||PR Type the function parameters of notes' own .hl files (HL-STANDARD L10)Atlas
  • 23758cd6Re-vendor complete Hybriel plugins and runtime to day44mre
  • 5d7cc700Backup tar: --hard-dereference, so mpackdb sidecars are never stored as hard links (Tracker's finding)mre
  • 3e07b1cfVendor complete Hybriel day39 plugin sources and librariesmre