Playing around with Node and websockets to see what all the fuss is about. Websockets are pretty cool and if I ever have to redo my project I may have to go Node just for that.
My question is though, what are these and what is the difference between them (Connect and Disconnect)? They don’t seem to have any properties set yet websockets still work?
Ignore the Name one … I was just seeing what it does.
The connect and disconnect actions run anytime a client connects/disconnects from the server (if the Socket element is added to the front end page).
So for example, you could use the Socket Identify in the connect action to store the socket id of every user when they first connect with your app. Then later on, you could send a direct message to a specific user using their socket id.
I must be doing something wrong? In my Network -> WS -> Messages in the developer tools it seems like it is going in an endless loop. And it never does give me the sid?
loop
Update: I think I know why it is in an endless loop. I have the websocket in my query API steps. So, of course it would just keep running itself over and over. I need to walk away and attack it again in the morning.