Hey, I’m developping something with go server authoritative + Unity, I have an issue with ISocket.SendMatchStateAsync.
I pass as parameters recipients some users but on go side I receive in the Match.MatchLoop a runtime.MatchData array which have only one recipient per message.
I just want to send, using dispatcher.BroadcastMessage to the proper recipients the client asked.
@louis030195 In authoritative matches the presences marked as the destination for the match data message is ignored because it’s intended to be controlled by the lifecycle of the authoritative match handler. Those parameters in the client only work with relayed matches where there’s no match handler and the server is not intended to intervene in the routing of the message.
Why do you want to trust the client with messages sent to specific peers in an authoritative match?
Hmm ok, that’s what I was thinking. Well my case is special, I decided to use an Unity client which acts as a (headless) server, because it’s easier to handle physics.
But anyway I can find a workaround, like passing the recipients in the data, it’s a bit ugly, but I don’t even know if I need to send to specific recipients.
I think there is something with streams also that could help.
@louis030195 I see the use case now. It’s an unusual one but given that your Unity headless instance works as the authoritative handler you could write a couple of socket RPCs and send direct to presences over the stream associated to the multiplayer match. I’ve not taken this approach before with a project but I see no reason it wouldn’t work.
1 Like
I see, that’s an interesting solution!
It’s a good thing that Nakama is very adaptable to everything we want to do.
1 Like