Multiroom chat

Options
Hi, all!
I have a simple question.
How to create multiroom chat on Photon Server (not on photon cloud)?

I found on client:
- keepMasterConnection - fot staing in master lobby always
- masterPeer.sendOperation - for sending to master
on server almost nothing.. maybe AppLobbyType.ChannelLobby

I also found Photon.Chat.ChatClient with subscriptions and so on, but it's not work with Photon Server (maybe only with cloud)

Someone?

Comments

  • DantaliaN
    Options
    Found on server

    ApplicationBase.Instance.BroadCastEvent(eventData, this.peers, new SendParameters());

    but it's not so easy (not nice) to get AppLobby.peers or GameList.peers..

    I think the best solution would be executing GameServer.Plugin.OnRaiseEvent from MasterServer.OnOperationRequest

    I hope to help with this
  • chvetsov
    Options
    Hi
    you may use chat subscription in parallel with your self hosted real time, if you do not like you may use two connections to server. first one will be connected to some chat room, second to game.
    rooms on game server have multiple purpose
  • DantaliaN
    Options
    Hi, chvetsov.

    I like your idea about multiple connections. Can you explane how to do that?

    I found
    // remove peer from current game this.RemovePeerFromCurrentRoom(LeaveReason.SwitchRoom, "eventual switch from other room.");

    but I not really sure how to make it correctly
  • chvetsov
    Options
    hi,

    well, room switching is obsolete since we started to use LoadBalancing

    in order to use multiple connections you need to create on client two peers or two LoadBalancingClient objects. and use them acorrding to your logic. one will be used for chat, another one will be used for gaming.