MCPcopy Create free account
hub / github.com/DeepNotesApp/DeepNotes / _handleCommand

Method _handleCommand

apps/realtime-server/src/sockets.ts:230–243  ·  view source on GitHub ↗
({ type, args }: RealtimeCommand)

Source from the content-addressed store, hash-verified

228 this.socket.send(encoding.toUint8Array(encoder));
229 }
230 private async _handleCommand({ type, args }: RealtimeCommand) {
231 switch (type) {
232 case RealtimeCommandType.HGET:
233 return await this._handleHGet(args);
234 case RealtimeCommandType.HSET:
235 return await this._handleHSet(args);
236 case RealtimeCommandType.SUBSCRIBE:
237 return await this._handleSubscribe(args);
238 case RealtimeCommandType.UNSUBSCRIBE:
239 return await this._handleUnsubscribe(args);
240 default:
241 throw new Error('Unknown command type');
242 }
243 }
244
245 private async _handleHGet(args: [DataPrefix, string, string]) {
246 const [prefix, suffix, field] = args;

Callers 1

_handleRequestMethod · 0.95

Calls 4

_handleHGetMethod · 0.95
_handleHSetMethod · 0.95
_handleSubscribeMethod · 0.95
_handleUnsubscribeMethod · 0.95

Tested by

no test coverage detected