You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm wondering if you'd be open to a contribution creating a "generic" client & server (or even just "N-peer") implementation of the protocol that relies on a supplied interface for sending and receiving messages, doc persistence, and auth - but handles things like room multiplexing, juggling multiple peers, etc.?
I think something like this would really simplify the process of trying to create custom adapters - since right now that requires doing work on both the processing of Messages/managing of peers & on the connection itself.
I'm thinking of having an interface that functions something like:
typeConnection<TextendsUint8Array|Message,E>={peerId: number,isBinary: boolean,onMessage?: (msg: T)=>void,onConnected?: ()=>void,onError?: (error: E)=>void,onClosed?: ()=>void,send: (msg: T)=>void,}interfaceGenericProtocolConnector{addConnection(con: Connection): void;// other options (for persistance, auth, etc) can mimic existing server implementation.// methods letting you create a doc + room, or ask peers for a doc & room .createDoc(id,adaptor: Adaptor);loadDoc(id,createIfNone?: ()=>Adaptor): Adaptor;}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I'm wondering if you'd be open to a contribution creating a "generic" client & server (or even just "N-peer") implementation of the protocol that relies on a supplied interface for sending and receiving messages, doc persistence, and auth - but handles things like room multiplexing, juggling multiple peers, etc.?
I think something like this would really simplify the process of trying to create custom adapters - since right now that requires doing work on both the processing of Messages/managing of peers & on the connection itself.
I'm thinking of having an interface that functions something like:
All reactions