Skip to content

Instantly share code, notes, and snippets.

@jdh30

jdh30/AsyncEcho.fs

Created Aug 14, 2019
Embed
What would you like to do?
Async echo server in F#
do
use listener = new System.Net.HttpListener()
listener.Prefixes.Add "http://localhost:8080/"
listener.Start()
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
You can’t perform that action at this time.