B4R Tutorial AsyncStreams Prefix Mode

Discussion in 'B4R Tutorials' started by Erel, Feb 26, 2017.

  1. Erel

    Erel Administrator Staff Member Licensed User

    rRandomAccessFile v1.80 adds support for AsyncStreams in prefix mode.
    All B4X development tools use AsyncStreams for network communication and now all of them support prefix mode (https://www.b4x.com/android/forum/threads/asyncstreams-tutorial.7669/#content).

    In prefix mode a 4 bytes header is added to each message with the message length. The NewData event will only be raised when there is a complete message available. You no longer need to handle split or merged messages.

    It is recommended to increase the StackBufferSize setting to 600 or more. The default message size limit in prefix mode is 500. The default in non-prefix mode is 100.

    AsyncStreams in prefix mode + B4RSerializator is the simplest way to communicate with other B4X applications.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice