11module Node.Http2.Server
22 ( toTlsServer
33 , createSecureServer
4- , createSecureServer'
54 , checkContinueHandle
65 , requestHandle
76 , sessionHandle
@@ -24,39 +23,21 @@ import Node.EventEmitter (EventHandle(..))
2423import Node.EventEmitter.UtilTypes (EventHandle1, EventHandle2, EventHandle4, EventHandle0)
2524import Node.Http2.Flags (BitwiseFlag)
2625import Node.Http2.Types (Headers, Http2CreateSecureServerOptions, Http2SecureServer, Http2ServerRequest, Http2ServerResponse, Http2Session, Http2Stream, Settings)
27- import Node.Net.Types (NewServerOptions, TCP)
28- import Node.Net.Types as NetTypes
26+ import Node.Net.Types (NewServerOptions)
2927import Node.Stream (Duplex)
30- import Node.TLS.Server as TlsServer
3128import Node.TLS.Types (CreateSecureContextOptions, Server, TlsCreateServerOptions, TlsServer)
3229import Prim.Row as Row
3330import Unsafe.Coerce (unsafeCoerce)
3431
3532toTlsServer :: Http2SecureServer -> TlsServer
3633toTlsServer = unsafeCoerce
3734
38- -- | Same as `createSecureServer` but provides the value as each of its subclasses via record syntax
39- -- | for ease of use.
4035createSecureServer
41- :: forall rec trash
42- . Row.Union rec trash (Http2CreateSecureServerOptions (TlsCreateServerOptions Server (CreateSecureContextOptions (NewServerOptions ()))))
43- => { | rec }
44- -> Effect { http2 :: Http2SecureServer, tls :: TlsServer, net :: NetTypes.Server TCP }
45- createSecureServer options = (runEffectFn1 createSecureServerImpl options) <#> \http2 -> do
46- let
47- tls = toTlsServer http2
48- net = TlsServer.toNetServer tls
49- { http2
50- , tls
51- , net
52- }
53-
54- createSecureServer'
5536 :: forall rec trash
5637 . Row.Union rec trash (Http2CreateSecureServerOptions (TlsCreateServerOptions Server (CreateSecureContextOptions (NewServerOptions ()))))
5738 => { | rec }
5839 -> Effect Http2SecureServer
59- createSecureServer' options = runEffectFn1 createSecureServerImpl options
40+ createSecureServer options = runEffectFn1 createSecureServerImpl options
6041
6142foreign import createSecureServerImpl :: forall r. EffectFn1 { | r } (Http2SecureServer)
6243
0 commit comments