creating a simple TCP server in F# and Suave.IO

565 Views Asked by At

Is it possible, using Suave.IO and F#, to create a simple one-line TCP server along the lines of the http server below?

startWebServer defaultConfig (Successful.OK "Hello World!")

(the TCP server could do something simple like reply with the string it received)

Thanks, Ian

1

There are 1 best solutions below

0
On

I don't think so. If you look at their API Reference, they support 2 protocols, HTTP and HTTPS:

type Protocol =
    | HTTP
    | HTTPS of obj
    member secure : bool