Skip to content

Streaming API #28

@synthfi

Description

@synthfi

One of MessagePack's design ideas is that it should be easy to implement a streaming API, such as in an server-client situation.

How can the internal design be worked so that the unpacking API can work in this fashion? So that something like:

mp = msgpack()
call mp%streaming_mode(1000) ! create an internal buffer of 1000 elements
do
  ! get data from somewhere, store in the `buf` array
  call mp%load_data(buf)
  if (mp%failed()) then
    ! error handling
  end if
  if (mp%value_available()) then
      call mp%next_value(mp_value)
      ! mp_value will be the unpacked value
  end if
end do

would work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions