Skip to content

Instantly share code, notes, and snippets.

@t0yv0
Created November 9, 2011 15:14
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save t0yv0/1351730 to your computer and use it in GitHub Desktop.
let rec loop : Async<unit> =
async {
let! req = HttpRequestParser.Parse buf read
let! resp = app.Handle req
let kA = isKeepAlive req
do! respond socket buf (setKeepAlive kA resp)
if isKeepAlive req then
return! loop
else
return ()
}
loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment