0 | module Node.HTTP2.ClientHttp2Stream
 1 |
 2 | import public Data.Buffer
 3 | import public Node.Error
 4 | import Node.Event.Internal
 5 | import Node.HTTP2.Headers
 6 | import public Node.Stream
 7 |
 8 | export
 9 | data ClientHttp2Stream : Type where [external]
10 |
11 | export
12 | implementation ReadableClass Buffer Error ClientHttp2Stream where
13 |
14 | export
15 | implementation WriteableClass Buffer Error ClientHttp2Stream where
16 |
17 | %foreign nodeOn1 "response"
18 | ffi_onResponse : a -> (b -> PrimIO ()) -> PrimIO ()
19 |
20 | export
21 | (.onResponse) : HasIO io => ClientHttp2Stream -> (Headers -> IO ()) -> io ()
22 | (.onResponse) = on1 ffi_onResponse
23 |
24 | %foreign nodeOn1 "push"
25 | ffi_onPush : a -> (b -> PrimIO ()) -> PrimIO ()
26 |
27 | export
28 | (.onPush) : HasIO io => ClientHttp2Stream -> (Headers -> IO ()) -> io ()
29 | (.onPush) = on1 ffi_onPush
30 |
31 |