What is the fastest possible way to get a byte[] message across?

I am trying to use
connection.StreamBytes(generalUnreliable, data);

to send data. I have it set up that I'm sending a ping type message, then the receiver is replying with a pong type message, and then the first person upon receiving calculates the time. For the sake of argument, assume I am sending a byte[] made from a string "PING" and the response is similarly "PONG"

What i'm seeing is that the round trip is consistently taking longer than the value derived from
BoltNetwork.server.PingNetwork

This leads me to believe (perhaps I'm making some wrong assumptions), that .StreamBytes doesn't send it instantly, but has some sort of buffering going on.

If that is the case, how do I send right away? (as I would if I were to create a basic UDP connection in c# and send bytes across on demand).
If this isn't the case, how is the PingNetwork call returning a smaller number? (30-40ms slower)

Comments

  • Hey, carrotstien

    I asked pretty much same question few days ago:

    forum.photonengine.com/discussion/10189/using-bolt-as-realtime-binary-data-transport
  • I looked at the code, PhotonPoller.cs ..and it looks like it gets sent on update(). That is not as fast as we need it :)
  • also, just verified with on the slack, events are sent 20/s...so definitely not as fast as we need it to be.
  • I looked at the code, PhotonPoller.cs ..and it looks like it gets sent on update(). That is not as fast as we need it
    "This is only the case for Photon Cloud relay. If you connect using punchthrough (which is around 98%+ of the time from what I've seen) it does not.

    "also, just verified with on the slack, events are sent 20/s...so definitely not as fast as we need it to be."
    This is not the case, whoever you spoke to was wrong.

    In the future I suggest not simultaneously posting to forums, Slack, and emailing us every time you have a question or someone tells you something incorrect, it is impossible to keep track of and respond to accurately.
  • sorry, I just assumed that there are different people paying attention to different support streams...and sometimes some people are busy :) For example, I asked a question that got answered on slack, but was also referred to you to get another answer..but you weren't around :D