PluginHost.BroadcastEvent is unexpected running

hello

we are implemented BroadcastEvent in photon loadbalance.
we have created custom plugin and implemented PluginBase class. our game communications is working fine with my custom Event Codes and OnRaiseEvent Event.
and also i have created a function for sending event code and Data to app using this.PluginHost.BroadcastEvent.

Here is code

public void MyBroudCast (object Data, int[] reciverActor, int senderActor, byte sendEventCode)
{
Thread.Sleep(1000);
this.PluginHost.BroadcastEvent(
recieverActors: reciverActor,
senderActor: 0,
data: new Dictionary() { { 245, new JavaScriptSerializer().Serialize(Data) } },
evCode: sendEventCode,
cacheOp: 0,
sendParameters: new SendParameters() { Unreliable = false });

}


Everything is working fine but Still i'm facing some issue on BroadcastEvent

1) Why i have to use Thread.Sleep(1000); Every time on Broadcast Event. if i'm not using it my BroadCast is not working
2) Game code is not getting Events and Data in synchronization way sometime is working and sometime not


Please provide me the solution.


Thanks
Omprakash Amarwal

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @OmiAmarwal,

    Try to keep a single support channel open at a time.
    I replied to your email.
  • is there any way that we can track our broadcast ??
    i just wanted to know my last broadCast is success or not.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @OmiAmarwal,

    No there is no callback for BroadcastEvent.
    In most cases it should be OK as we have a low level resend/retry and acks. This is when the connection between client and server is not lost.
    If this is a must for you, you should implement an ACK mechanism from clients: clients return and event to the server/plugin that they received the event.
  • ok cool can you please provide me that links.

    and one more thing is that, I want to use operation code which is in MasterClientPeer.cs
    is it working same as plugins. and if yes then please let me know which one is more faster.
    also please provide me links about operationCode.
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited August 2017
    ok cool can you please provide me that links.

    I don't know what links are you looking for.

    and one more thing is that, I want to use operation code which is in MasterClientPeer.cs
    is it working same as plugins. and if yes then please let me know which one is more faster.

    I don't know what operation are you talking about.
    Maybe @chvetsov may have an idea.
  • well, i also do not have an idea

    best,
    ilya
  • OmiAmarwal
    edited September 2017
    can you please help me to get list of all running games at the moment (created games list and each game joined player list)

    Thanks
  • @OmiAmarwal please create new topic when you have new question. do NOT reuse old one

    you can not get game player list. what you actually asking we do not recommend to do. because it may break your clients if you have thousands of games

    please read this page: https://doc.photonengine.com/en/realtime/current/reference/matchmaking-and-lobby to get clue how it is working. Look for "Custom Room Listing"

    best,
    ilya