MCPcopy Create free account
hub / github.com/dgreif/ring / getConnection

Method getConnection

packages/ring-client-api/location.ts:321–333  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

319 }
320
321 getConnection() {
322 if (!this.hasHubs) {
323 return Promise.reject(
324 new Error(`Location ${this.name} does not have any hubs`),
325 )
326 }
327
328 if (this.connectionPromise) {
329 return this.connectionPromise
330 }
331
332 return (this.connectionPromise = this.createConnection())
333 }
334
335 async sendMessage(message: {
336 msg: MessageType

Callers 2

sendMessageMethod · 0.95
getDevicesMethod · 0.95

Calls 1

createConnectionMethod · 0.95

Tested by

no test coverage detected