0 | module Node.HTTP2.Static
 1 |
 2 | import Node
 3 | import Node.HTTP2.Connect
 4 | import Node.HTTP2.ClientHttp2Session
 5 | import Node.HTTP2.CreateSecureServer
 6 | import Node.HTTP2.CreateServer
 7 | import Node.HTTP2.Http2Server
 8 | import Node.HTTP2.Module
 9 |
10 | %foreign "node:lambda: (http2, opts) => http2.createServer(opts)"
11 | ffi_createServer : HTTP2Module -> Node HTTP2.CreateServer.Command.Options -> PrimIO Http2Server
12 |
13 | export
14 | (.createServer) : HasIO io => HTTP2Module -> HTTP2.CreateServer.Command.Options -> io Http2Server
15 | (.createServer) http2 opts = primIO $ ffi_createServer http2 (convertOptions opts)
16 |
17 | %foreign "node:lambda: (http2, opts) => http2.createSecureServer(opts)"
18 | ffi_createSecureServer : HTTP2Module -> Node HTTP2.CreateSecureServer.Command.Options -> PrimIO Http2Server
19 |
20 | export
21 | (.createSecureServer) : HasIO io => HTTP2Module -> HTTP2.CreateSecureServer.Command.Options -> io Http2Server
22 | (.createSecureServer) http2 opts = primIO $ ffi_createSecureServer http2 (convertOptions opts)
23 |
24 | %foreign "node:lambda: (http2, authority, connectOptions) => http2.connect(authority, connectOptions)"
25 | ffi_connect : HTTP2Module -> String -> Node Connect.Options -> PrimIO ClientHttp2Session
26 |
27 | export
28 | (.connect) : HasIO io => HTTP2Module -> String -> Connect.Options -> io ClientHttp2Session
29 | (.connect) http2 authority connectOptions = primIO $ ffi_connect http2 authority $ convertOptions connectOptions
30 |
31 |