Skip to content

Instantly share code, notes, and snippets.

Created Aug 14, 2019
What would you like to do?
Async echo server in F#
use listener = new System.Net.HttpListener()
listener.Prefixes.Add "http://localhost:8080/"
while true do
let context = listener.GetContext()
async { use input = context.Request.InputStream
use output = context.Response.OutputStream
input.CopyTo output }
|> Async.Start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment