https://github.com/dev1an/eventsource
Swift library to read SSE / EventSources. Works on macOS and Linux
https://github.com/dev1an/eventsource
event-emitter event-source event-source-client http linux macos server-sent-events sse
Last synced: 7 months ago
JSON representation
Swift library to read SSE / EventSources. Works on macOS and Linux
- Host: GitHub
- URL: https://github.com/dev1an/eventsource
- Owner: Dev1an
- License: mit
- Created: 2017-03-31T19:13:32.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-01T22:49:02.000Z (over 8 years ago)
- Last Synced: 2025-01-21T13:09:29.779Z (9 months ago)
- Topics: event-emitter, event-source, event-source-client, http, linux, macos, server-sent-events, sse
- Language: Swift
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
## Installation
on **Linux** some packages need to be installed first:
```
sudo apt-get install libssl-dev uuid-dev libcurl4-openssl-dev
```## Usage
```swift
let firebase = "https://homecontrol-f0066.firebaseio.com/Home/0/Radio/0/currentChannel.json"EventStream(from: firebase) {
print("event:", $0)
print("data:", $1)
}
```## Missing features
- Newline separators: the library currently only works with `\n` as newline. The following separaters are not supported:
- `\r\n`
- `\r`