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

Method _handleMessage

apps/realtime-server/src/sockets.ts:150–166  ·  view source on GitHub ↗
(message: ArrayBuffer)

Source from the content-addressed store, hash-verified

148 };
149
150 private async _handleMessage(message: ArrayBuffer) {
151 if (await this._checkSessionInvalidated()) {
152 return;
153 }
154
155 const decoder = decoding.createDecoder(new Uint8Array(message));
156
157 const messageType = decoding.readVarUint(decoder);
158
159 switch (messageType) {
160 case RealtimeClientMessageType.REQUEST:
161 await this._handleRequest(decoder);
162 break;
163 default:
164 throw new Error('Unknown message type');
165 }
166 }
167 private async _handleRequest(decoder: decoding.Decoder) {
168 // Gather commands
169

Callers 1

constructorMethod · 0.95

Calls 2

_handleRequestMethod · 0.95

Tested by

no test coverage detected