Skip to content

deapsquatter/FSharp.SSEClient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Client for reading Server-Sent Events (SSE)

The library (FSharp.SSEClient) implements a client for reading events typically over Http (although you can use any stream you like). The library aims to conform (as close as possible) to the SSE Specification.

Example Usage

The SSE Client is implemented as an Observable. This makes it handy to compose your events using RX.

open FSharp.SSEClient
open FSharp.Data

let s = Http.RequestStream("http://demo.howopensource.com/sse/stocks.php")
Connection.Receive s.ResponseStream
  |> Observable.subscribe (printfn "SSE Event=%A")

Building

  • Windows: Run build.cmd
  • Mono: Run build.sh

Using with PAKET

FSharp.SSEClient can easily be linked as a single file using the PAKET dependency manager. Simply add the following to your paket.dependencies file:

group SSE
   github deapsquatter/FSharp.SSEClient /src/SSEClient.fs

and to your projects paket.references file:

group SSE
    File:SSEClient.fs

About

Server-Sent Events Client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published