Skip to content

Instantly share code, notes, and snippets.

@rgrinberg
Created May 6, 2016 21:27
Show Gist options
  • Save rgrinberg/9e35081ae397e278fd10d10daa7c4598 to your computer and use it in GitHub Desktop.
Save rgrinberg/9e35081ae397e278fd10d10daa7c4598 to your computer and use it in GitHub Desktop.
open Core.Std
open Async.Std
type chunk = String of string | Bigstring of Bigstring.t
type sink = Bigstring.t option -> unit Deferred.t
type source = unit -> chunk option Deferred.t
type handler =
{ init: Session.t -> [`Drop | `Accept of sink | `Forget ] Deferred.t
; handle: Session.t -> Response.t * source }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment