Skip to content

Receiving events without data #19

@komkovla

Description

@komkovla

Description

dataTask stream would receive event with event only without any data when data is present. After investigation I found out that SessionDelegate would pass only part of data with event, separating response from the server to several didReceiveData calls. Sometimes SessionDelegate would pass full block, then processing of the message is correct.

To Reproduce

I am communicating with java-spring SSE server on localhost, I can share server with instructions to run it if needed

Steps:

  • Open connection
  • Observe event stream
  • Receive event
  • Received event contain event type but does not contains any data

Expected behavior

Library would cache data to the buffer and parse event only when complete event is received.

Steps:

  • Open connection
  • Observe event stream
  • Receive event
  • Received event contains data

Additional context

  • Platform: iOS 18.1
  • EventSource version: 0.1.1

Thanks for taking your time to implement this library, integration was super easy. I can try to implement caching data myself and create a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions