Skip to main content

Function: disconnected()

function disconnected(request, context): Promise<void>;

Defined in: functions/socket.ts:99

disconnected - Socket.IO disconnect callback

This callback fires when a socket.io connection is disconnected. If the user was still in a room at the time, notify members in the room that this user is no longer online. This is not the same as "disconnected" or "left" the room. Clients should use presence/off on to update their state when someone isn't actively connected.

Parameters

ParameterTypeDescription
requestSocketIOTriggerThe SocketIODataTrigger
contextInvocationContextThe Invocation Context (metadata)

Returns

Promise<void>