Socket Identify — Reference
Read the current connection’s socket identifier.
Read the current connection’s socket identifier.
Before you begin
Section titled “Before you begin”- A Node.js project with Socket.IO configured and connected test clients. Socket-specific operations must run in a socket action.
Socket Identify
Section titled “Socket Identify”Read the current connection’s socket identifier.
Settings
Section titled “Settings”| Setting | Meaning |
|---|---|
| Name | The step identifier used for results in the server action. Sending/joining steps do not return a delivery receipt merely because they have a name. |
Verification example
Section titled “Verification example”From a test socket action, read Identify and return it through a deliberately output Set Value if needed for debugging. Reconnect the client and check the new connection context.
Context and delivery limits
Section titled “Context and delivery limits”Outside a socket action the installed module returns null. This is distinct from Security Identify, which returns an authenticated provider identity. Never use a socket ID alone as proof of identity or authorization.
Connect to page behavior
Section titled “Connect to page behavior”Use client event handlers or the appropriate Server Connect subscription to update the page. Keep authorization, persistence and event delivery as explicit parts of the workflow.
Check your result
Section titled “Check your result”You can choose the intended recipients/context and verify the event or room behavior with test clients.