njones / socketio

A Modern SocketIO library for go
MIT License
64 stars 9 forks source link

Accessing Socket Object from Event #48

Closed nmilallos97 closed 1 year ago

nmilallos97 commented 1 year ago

Hello this library is really useful as it's the only library that is currently implementing latest from Socket.IO

I just would like to ask how can I access the SocketV4 object like I need the ID for example to check if that ID is part of a room, how do I get that information from an event trigger like so:

serverV4.Of("/myNamespace").On("myEvent", callback.FuncString(func(i string) {
     // access socketID of who triggered the event
})

Is there any way to do this?

nmilallos97 commented 1 year ago

I found it out already. Closing this issue.