Is Photon Client-Server sends data at one operation?

Options
freaka61
edited June 2013 in Photon Server
Hi, I'm working on a MMO project and I must ask a question before start to making my packet system. Now, If I send ~5kb from the client, is Photon give this data to our application at one operation (callback)? I'll start to make a packet handler when I learned this. Thanks...

Comments

  • Yes, it will.

    Photon takes care of the complete serializiation & packet handling for you; if your client sends an operation with a "payload" of 5kb, Photon will only pass the data to your application after it has received the full 5kb.

    In general, Photon is optimized for many small messages (rather than with a few big ones) - you might want to keep that in mind.
  • Ok, thanks! But I want to ask one more thing. If I send a data from a .Net Socket (TCP) to my .Net Socket (TCP) listener, isn't data passing in one time already? Namely am I have to implement a packet handler system in .Net Sockets (without Photon)?
  • Kaiserludi
    Options
    tcp already cares about that on its own, as its stream-based, not packet-based, however for udp with raw sockets without any lib caring about that you would have to implement it on your own.