Back to Browser Side Quest
SOURCE / PINNED RELEASE

Made of little things.

Browser Side Quest

Release
b9d42f5768e4…
Author-recorded commit
c267690145fa…
License
LICENSE
Author’s source reference
nostr://npub1ye5ptcxfyyxl5vjvdjar2ua3f0hynkjzpx552mu5snj3qmx5pzjscpknpr/wss%3A%2F%2Fgit.shakespeare.diy%2F/browser-side-quest

Archive hash verified: 6d4b90b8a5f328f7…. The source-to-build association is the author’s claim; it has not been independently rebuilt.

src/net/transport.ts
/**
 * The client's link to a world. Replaces the original WebSocket: the world may
 * run in this tab (solo, or when this tab hosts the shard) or on a peer over
 * NAP-WEBRTC. Messages are the original BrowserQuest JSON arrays.
 */
export interface TransportHandlers {
  /** The world accepted the connection (the original server's "go"). */
  onReady(): void;
  /** One message or a batch (array of messages), as the original server sent. */
  onMessage(data: unknown): void;
  onClose(reason: string): void;
}

export interface Transport {
  connect(handlers: TransportHandlers): void;
  send(message: unknown[]): void;
  close(): void;
}