Information about message size


As it is said in the documentation, we cannot send message that are bigger than 1200 bits, I would like to know if it is possible to increase this limitation ? why 1200 bits ?



  • Hi @benjaml,

    As it is said in the documentation, we cannot send message that are bigger than 1200 bits
    May I know where you read this?

    Actually you can send messages much bigger than that.
    Read this.
  • Kaiserludi
    Kaiserludi admin
    edited October 2019
    Hi @benjaml.

    There is no 1200bit limit and I am not aware of any place in the documentation where it states that there would be such a limit.

    Client::sendDirect() has a message size limit of 1200 bytes (NOT bits!).
    Client::opRaiseEvent() in UDP mode splits messages up into multiple fragments that are sent in separate UDP datagrams, if the overall message size including protocol overhead exceeds 1200 bytes. Note, that although opRaiseEvent() supports messages bigger than 1200 bytes through fragmentation that does not mean that there is no limit at all. Please see the link by @JohnTube for details. Please also note that when a message gets fragmented, the reliability-flag will be ignored and the fragments of that message will always be sent reliably. The reason for this is, that if only a single fragment gets lost all other fragments of that message become useless.

    Why 1200 bytes?
    Because UDP is affected by the that can vary at every point in the internet infrastructure that a datagram passes on its way from the sender to the receiver (TCP automatically deals with this under the hood similarily to how our UDP message fragmentation deals with it). 1200 bytes from our experience is a pretty save bet. If we would allow datagrams of a considerably bigger size, then lots of messages would get lost on their way, because they would need to pass hardware that can't process datagrams that big.

    As stated in the API reference for Client::sendDirect(), it does not support fragmentation and for messages that need this feature you should use opRaiseEvent() instead.

    If you want to send bigger messages with sendDirect() or if you want to send them unreliably with opRaiseEvent(), you can of course always split them up into smaller chunks and rebuild them on the receiving side yourself.