The socket object
Your message listeners that you define in your namespace CFC will all receive a socket
argument that represents the connected socket that sent the message.
The base definition of this object can be found here: https://pixl8.github.io/socket.io-lucee/api/index.html.
This extension adds in Preside specific helper methods onto the Socket object that help withidentifying logged in users. The new methods are:
socket.isWebUser()
: Whether the socket belongs to a logged in web usersocket.isAdminUser()
: Whether the socket belongs to a logged in admin usersocket.getAdminLoggedInUserId()
: Returns the ID of the logged in admin user associated with the socketsocket.getWebsiteLoggedInUserId()
: Returns the ID of the logged in web user associated with the socketsocket.getWebsiteLoggedInUserDetails()
: Returns the record as a struct of the logged in web user associated with the socket