Skip to content

RPC requires framed option? #20

@battlmonstr

Description

@battlmonstr

The checkReadBuffer function of MPMessagePackClient willl stop parsing a big message with an error on this line of code:

[self handleError:error fatal:YES];

This function tries to parse _readBuffer, which is filled from the stream by portions using a smaller buffer here:

uint8_t buffer[4096];

This happens in 2 cases:

  • either the complete message is bigger than the smaller buffer size (4096 bytes)
  • or the network is slow to load just a part of the message in one read call (let's say your message is 2K, but the network provides only the first 1K in the beginning)

I'd prefer that this RPC client was tolerant to the errors that happen due to the buffer index outrun, and just retried readInputStream in this case.

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