Skip to content

Instantly share code, notes, and snippets.

@panesofglass
Forked from t0yv0/server.fs
Created November 15, 2011 23:14
Show Gist options
  • Save panesofglass/1368696 to your computer and use it in GitHub Desktop.
Save panesofglass/1368696 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