Events Sent by a Server with AFNetworking

Has anyone been able to get Server-Sent-Events (SSE) working fine through AFNetworking? I know that AFURLConnectionOperation has an inputStream property that I can connect to, but the AFNetworking architecture seems to be focused on getting a response, so I'm not sure what the best way to do this would be.

Any questions on how to structure such a program would be appreciated. I am also open to other iOS libraries if they provide cleaner solutions.

+6
source share
1 answer

AFRocketClient (built on top of AFNetworking 2.0 ) contains AFEventSource , which is an implementation of the W3C event source API.

The combination of server-side events and the JSON patch is called Rocket .

+2
source

Source: https://habr.com/ru/post/949490/


All Articles