kataras / neffos

A modern, fast and scalable websocket framework with elegant API written in Go
http://bit.ly/neffos-wiki
MIT License
572 stars 47 forks source link

[FEATURE REQUEST]Whether the authentication information can be provided with the message#Body when client joining the room? #22

Closed colorworlds closed 4 years ago

colorworlds commented 4 years ago

I want to build a private room. The client can join the private room but it must complete the authentication. So I need to send authentication information to the server to determine whether the client's request to join is illegal. But I find that nsConn.JoinRoom(ctx, "room") does not provide a way to send a custom message. the following function also can't provide Message#Body filed: neffos.OnRoomJoined: func(c *neffos.NSConn,msg neffos.Message) error The client seems to be able to forcibly join any specific room.it bypass my certification. I am a newcomer if I miss some useful API?

colorworlds commented 4 years ago

I find Server#IDGenerator can confirm user's ID. It's enough.