MCPcopy Create free account
hub / github.com/async-labs/async / getSocket

Function getSocket

api/server/sockets.ts:120–132  ·  view source on GitHub ↗
(socketId?: string)

Source from the content-addressed store, hash-verified

118}
119
120function getSocket(socketId?: string) {
121 if (!io) {
122 return null;
123 }
124
125 if (socketId && io.sockets.sockets.get(socketId)) {
126 // if client connected to socket broadcast to other connected sockets
127 return io.sockets.sockets.get(socketId).broadcast;
128 } else {
129 // if client NOT connected to socket sent to all sockets
130 return io;
131 }
132}
133
134function discussionAdded({
135 socketId,

Callers 15

discussionAddedFunction · 0.85
discussionEditedFunction · 0.85
discussionDeletedFunction · 0.85
discussionArchivedFunction · 0.85
commentAddedFunction · 0.85
commentEditedFunction · 0.85
commentDeletedFunction · 0.85
fileAddedInsideCommentFunction · 0.85
fileDeletedInsideCommentFunction · 0.85
unreadCommentAddedFunction · 0.85
unreadCommentDeletedFunction · 0.85
chatAddedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected