Use TLS-secured network sockets together with the Haskell pipes library.