@@ -61,184 +61,184 @@ import Node.Buffer.Immutable (ImmutableBuffer)
6161import Node.Http2.Types (Client , Headers , Http2Session , Http2Stream , Server , Settings )
6262import Node.Net.Socket (Socket )
6363
64- onClose :: forall peer . Http2Session peer -> Effect Unit -> Effect Unit
64+ onClose :: forall endpoint . Http2Session endpoint -> Effect Unit -> Effect Unit
6565onClose session cb = runEffectFn2 onCloseImpl session cb
6666
67- foreign import onCloseImpl :: forall peer . EffectFn2 (Http2Session peer ) (Effect Unit ) Unit
67+ foreign import onCloseImpl :: forall endpoint . EffectFn2 (Http2Session endpoint ) (Effect Unit ) Unit
6868
69- onConnect :: forall peer . Http2Session peer -> (Http2Session peer -> Socket -> Effect Unit ) -> Effect Unit
69+ onConnect :: forall endpoint . Http2Session endpoint -> (Http2Session endpoint -> Socket -> Effect Unit ) -> Effect Unit
7070onConnect h2s cb = runEffectFn2 onConnectImpl h2s $ mkEffectFn2 cb
7171
72- foreign import onConnectImpl :: forall peer . EffectFn2 (Http2Session peer ) (EffectFn2 (Http2Session peer ) Socket Unit ) Unit
72+ foreign import onConnectImpl :: forall endpoint . EffectFn2 (Http2Session endpoint ) (EffectFn2 (Http2Session endpoint ) Socket Unit ) Unit
7373
74- onError :: forall peer . Http2Session peer -> (Error -> Effect Unit ) -> Effect Unit
74+ onError :: forall endpoint . Http2Session endpoint -> (Error -> Effect Unit ) -> Effect Unit
7575onError session cb = runEffectFn2 onErrorImpl session $ mkEffectFn1 cb
7676
77- foreign import onErrorImpl :: forall peer . EffectFn2 (Http2Session peer ) (EffectFn1 Error Unit ) (Unit )
77+ foreign import onErrorImpl :: forall endpoint . EffectFn2 (Http2Session endpoint ) (EffectFn1 Error Unit ) (Unit )
7878
79- onFrameError :: forall peer . Http2Session peer -> (Int -> Int -> Int -> Effect Unit ) -> Effect Unit
79+ onFrameError :: forall endpoint . Http2Session endpoint -> (Int -> Int -> Int -> Effect Unit ) -> Effect Unit
8080onFrameError session cb = runEffectFn2 onFrameErrorImpl session $ mkEffectFn3 cb
8181
82- foreign import onFrameErrorImpl :: forall peer . EffectFn2 (Http2Session peer ) (EffectFn3 Int Int Int Unit ) (Unit )
82+ foreign import onFrameErrorImpl :: forall endpoint . EffectFn2 (Http2Session endpoint ) (EffectFn3 Int Int Int Unit ) (Unit )
8383
84- onGoAway :: forall peer . Http2Session peer -> (Int -> Int -> Maybe ImmutableBuffer -> Effect Unit ) -> Effect Unit
84+ onGoAway :: forall endpoint . Http2Session endpoint -> (Int -> Int -> Maybe ImmutableBuffer -> Effect Unit ) -> Effect Unit
8585onGoAway session cb = runEffectFn2 onGoAwayImpl session $ mkEffectFn3 \c lsi buf ->
8686 cb c lsi (toMaybe buf)
8787
88- foreign import onGoAwayImpl :: forall peer . EffectFn2 (Http2Session peer ) (EffectFn3 Int Int (Nullable ImmutableBuffer ) Unit ) (Unit )
88+ foreign import onGoAwayImpl :: forall endpoint . EffectFn2 (Http2Session endpoint ) (EffectFn3 Int Int (Nullable ImmutableBuffer ) Unit ) (Unit )
8989
90- onLocalSettings :: forall peer . Http2Session peer -> (Settings -> Effect Unit ) -> Effect Unit
90+ onLocalSettings :: forall endpoint . Http2Session endpoint -> (Settings -> Effect Unit ) -> Effect Unit
9191onLocalSettings session cb = runEffectFn2 onLocalSettingsImpl session $ mkEffectFn1 cb
9292
93- foreign import onLocalSettingsImpl :: forall peer . EffectFn2 (Http2Session peer ) (EffectFn1 Settings Unit ) (Unit )
93+ foreign import onLocalSettingsImpl :: forall endpoint . EffectFn2 (Http2Session endpoint ) (EffectFn1 Settings Unit ) (Unit )
9494
95- onPing :: forall peer . Http2Session peer -> (Maybe ImmutableBuffer -> Effect Unit ) -> Effect Unit
95+ onPing :: forall endpoint . Http2Session endpoint -> (Maybe ImmutableBuffer -> Effect Unit ) -> Effect Unit
9696onPing sesson cb = runEffectFn2 onPingImpl sesson $ mkEffectFn1 \a -> cb $ toMaybe a
9797
98- foreign import onPingImpl :: forall peer . EffectFn2 (Http2Session peer ) (EffectFn1 (Nullable ImmutableBuffer ) Unit ) (Unit )
98+ foreign import onPingImpl :: forall endpoint . EffectFn2 (Http2Session endpoint ) (EffectFn1 (Nullable ImmutableBuffer ) Unit ) (Unit )
9999
100- onRemoteSettings :: forall peer . Http2Session peer -> (Settings -> Effect Unit ) -> Effect Unit
100+ onRemoteSettings :: forall endpoint . Http2Session endpoint -> (Settings -> Effect Unit ) -> Effect Unit
101101onRemoteSettings session cb = runEffectFn2 onRemoteSettingsImpl session $ mkEffectFn1 cb
102102
103- foreign import onRemoteSettingsImpl :: forall peer . EffectFn2 (Http2Session peer ) (EffectFn1 Settings Unit ) (Unit )
103+ foreign import onRemoteSettingsImpl :: forall endpoint . EffectFn2 (Http2Session endpoint ) (EffectFn1 Settings Unit ) (Unit )
104104
105- onStream :: forall peer . Http2Session peer -> (Http2Stream peer -> Headers -> Number -> (Array String ) -> Effect Unit ) -> Effect Unit
105+ onStream :: forall endpoint . Http2Session endpoint -> (Http2Stream endpoint -> Headers -> Number -> (Array String ) -> Effect Unit ) -> Effect Unit
106106onStream session cb = runEffectFn2 onStreamImpl session $ mkEffectFn4 cb
107107
108- foreign import onStreamImpl :: forall peer . EffectFn2 (Http2Session peer ) (EffectFn4 (Http2Stream peer ) Headers Number (Array String ) Unit ) (Unit )
108+ foreign import onStreamImpl :: forall endpoint . EffectFn2 (Http2Session endpoint ) (EffectFn4 (Http2Stream endpoint ) Headers Number (Array String ) Unit ) (Unit )
109109
110- onTimeout :: forall peer . Http2Session peer -> Effect Unit -> Effect Unit
110+ onTimeout :: forall endpoint . Http2Session endpoint -> Effect Unit -> Effect Unit
111111onTimeout session cb = runEffectFn2 onTimeoutImpl session cb
112112
113- foreign import onTimeoutImpl :: forall peer . EffectFn2 (Http2Session peer ) (Effect Unit ) (Unit )
113+ foreign import onTimeoutImpl :: forall endpoint . EffectFn2 (Http2Session endpoint ) (Effect Unit ) (Unit )
114114
115- alpnProtocol :: forall peer . Http2Session peer -> Effect (Maybe String )
115+ alpnProtocol :: forall endpoint . Http2Session endpoint -> Effect (Maybe String )
116116alpnProtocol session = map toMaybe $ runEffectFn1 alpnProtocolImpl session
117117
118- foreign import alpnProtocolImpl :: forall peer . EffectFn1 (Http2Session peer ) (Nullable String )
118+ foreign import alpnProtocolImpl :: forall endpoint . EffectFn1 (Http2Session endpoint ) (Nullable String )
119119
120- close :: forall peer . Http2Session peer -> Effect Unit
120+ close :: forall endpoint . Http2Session endpoint -> Effect Unit
121121close session = runEffectFn1 closeImpl session
122122
123- foreign import closeImpl :: forall peer . EffectFn1 (Http2Session peer ) (Unit )
123+ foreign import closeImpl :: forall endpoint . EffectFn1 (Http2Session endpoint ) (Unit )
124124
125- closed :: forall peer . Http2Session peer -> Effect Boolean
125+ closed :: forall endpoint . Http2Session endpoint -> Effect Boolean
126126closed session = runEffectFn1 closedImpl session
127127
128- foreign import closedImpl :: forall peer . EffectFn1 (Http2Session peer ) (Boolean )
128+ foreign import closedImpl :: forall endpoint . EffectFn1 (Http2Session endpoint ) (Boolean )
129129
130- connecting :: forall peer . Http2Session peer -> Effect Boolean
130+ connecting :: forall endpoint . Http2Session endpoint -> Effect Boolean
131131connecting session = runEffectFn1 connectingImpl session
132132
133- foreign import connectingImpl :: forall peer . EffectFn1 (Http2Session peer ) (Boolean )
133+ foreign import connectingImpl :: forall endpoint . EffectFn1 (Http2Session endpoint ) (Boolean )
134134
135- destroy :: forall peer . Http2Session peer -> Effect Unit
135+ destroy :: forall endpoint . Http2Session endpoint -> Effect Unit
136136destroy session = runEffectFn1 destroyImpl session
137137
138- foreign import destroyImpl :: forall peer . EffectFn1 (Http2Session peer ) (Unit )
138+ foreign import destroyImpl :: forall endpoint . EffectFn1 (Http2Session endpoint ) (Unit )
139139
140- destroyWithError :: forall peer . Http2Session peer -> Error -> Effect Unit
140+ destroyWithError :: forall endpoint . Http2Session endpoint -> Error -> Effect Unit
141141destroyWithError s e = runEffectFn2 destroyWithErrorImpl s e
142142
143- foreign import destroyWithErrorImpl :: forall peer . EffectFn2 (Http2Session peer ) (Error ) (Unit )
143+ foreign import destroyWithErrorImpl :: forall endpoint . EffectFn2 (Http2Session endpoint ) (Error ) (Unit )
144144
145- destroyWithCode :: forall peer . Http2Session peer -> Int -> Effect Unit
145+ destroyWithCode :: forall endpoint . Http2Session endpoint -> Int -> Effect Unit
146146destroyWithCode s c = runEffectFn2 destroyWithCodeImpl s c
147147
148- foreign import destroyWithCodeImpl :: forall peer . EffectFn2 (Http2Session peer ) (Int ) (Unit )
148+ foreign import destroyWithCodeImpl :: forall endpoint . EffectFn2 (Http2Session endpoint ) (Int ) (Unit )
149149
150- destroyWithErrorCode :: forall peer . Http2Session peer -> Error -> Int -> Effect Unit
150+ destroyWithErrorCode :: forall endpoint . Http2Session endpoint -> Error -> Int -> Effect Unit
151151destroyWithErrorCode s e c = runEffectFn3 destroyWithErrorCodeImpl s e c
152152
153- foreign import destroyWithErrorCodeImpl :: forall peer . EffectFn3 (Http2Session peer ) (Error ) (Int ) (Unit )
153+ foreign import destroyWithErrorCodeImpl :: forall endpoint . EffectFn3 (Http2Session endpoint ) (Error ) (Int ) (Unit )
154154
155- destroyed :: forall peer . Http2Session peer -> Effect Boolean
155+ destroyed :: forall endpoint . Http2Session endpoint -> Effect Boolean
156156destroyed s = runEffectFn1 destroyedImpl s
157157
158- foreign import destroyedImpl :: forall peer . EffectFn1 (Http2Session peer ) (Boolean )
158+ foreign import destroyedImpl :: forall endpoint . EffectFn1 (Http2Session endpoint ) (Boolean )
159159
160- encrypted :: forall peer . Http2Session peer -> Effect (Maybe Boolean )
160+ encrypted :: forall endpoint . Http2Session endpoint -> Effect (Maybe Boolean )
161161encrypted s = map toMaybe $ runEffectFn1 encryptedImpl s
162162
163- foreign import encryptedImpl :: forall peer . EffectFn1 (Http2Session peer ) (Nullable Boolean )
163+ foreign import encryptedImpl :: forall endpoint . EffectFn1 (Http2Session endpoint ) (Nullable Boolean )
164164
165- goAway :: forall peer . Http2Session peer -> Effect Unit
165+ goAway :: forall endpoint . Http2Session endpoint -> Effect Unit
166166goAway s = runEffectFn1 goAwayImpl s
167167
168- foreign import goAwayImpl :: forall peer . EffectFn1 (Http2Session peer ) (Unit )
168+ foreign import goAwayImpl :: forall endpoint . EffectFn1 (Http2Session endpoint ) (Unit )
169169
170- goAwayCode :: forall peer . Http2Session peer -> Int -> Effect Unit
170+ goAwayCode :: forall endpoint . Http2Session endpoint -> Int -> Effect Unit
171171goAwayCode s c = runEffectFn2 goAwayCodeImpl s c
172172
173- foreign import goAwayCodeImpl :: forall peer . EffectFn2 (Http2Session peer ) (Int ) (Unit )
173+ foreign import goAwayCodeImpl :: forall endpoint . EffectFn2 (Http2Session endpoint ) (Int ) (Unit )
174174
175- goAwayCodeLastStreamId :: forall peer . Http2Session peer -> Int -> Int -> Effect Unit
175+ goAwayCodeLastStreamId :: forall endpoint . Http2Session endpoint -> Int -> Int -> Effect Unit
176176goAwayCodeLastStreamId s c lsi = runEffectFn3 goAwayCodeLastStreamIdImpl s c lsi
177177
178- foreign import goAwayCodeLastStreamIdImpl :: forall peer . EffectFn3 (Http2Session peer ) (Int ) (Int ) (Unit )
178+ foreign import goAwayCodeLastStreamIdImpl :: forall endpoint . EffectFn3 (Http2Session endpoint ) (Int ) (Int ) (Unit )
179179
180- goAwayCodeLastStreamIdData :: forall peer . Http2Session peer -> Int -> Int -> ImmutableBuffer -> Effect Unit
180+ goAwayCodeLastStreamIdData :: forall endpoint . Http2Session endpoint -> Int -> Int -> ImmutableBuffer -> Effect Unit
181181goAwayCodeLastStreamIdData s c lsi buf = runEffectFn4 goAwayCodeLastStreamIdOpaqueDataImpl s c lsi buf
182182
183- foreign import goAwayCodeLastStreamIdOpaqueDataImpl :: forall peer . EffectFn4 (Http2Session peer ) (Int ) (Int ) (ImmutableBuffer ) (Unit )
183+ foreign import goAwayCodeLastStreamIdOpaqueDataImpl :: forall endpoint . EffectFn4 (Http2Session endpoint ) (Int ) (Int ) (ImmutableBuffer ) (Unit )
184184
185- localSettings :: forall peer . Http2Session peer -> Effect Settings
185+ localSettings :: forall endpoint . Http2Session endpoint -> Effect Settings
186186localSettings s = runEffectFn1 localSettingsImpl s
187187
188- foreign import localSettingsImpl :: forall peer . EffectFn1 (Http2Session peer ) (Settings )
188+ foreign import localSettingsImpl :: forall endpoint . EffectFn1 (Http2Session endpoint ) (Settings )
189189
190- originSet :: forall peer . Http2Session peer -> Array String
190+ originSet :: forall endpoint . Http2Session endpoint -> Array String
191191originSet s = fromMaybe [] $ toMaybe $ runFn1 originSetImpl s
192192
193- foreign import originSetImpl :: forall peer . Fn1 (Http2Session peer ) (Nullable (Array String ))
193+ foreign import originSetImpl :: forall endpoint . Fn1 (Http2Session endpoint ) (Nullable (Array String ))
194194
195- pendingSettingsAck :: forall peer . Http2Session peer -> Effect Boolean
195+ pendingSettingsAck :: forall endpoint . Http2Session endpoint -> Effect Boolean
196196pendingSettingsAck s = runEffectFn1 pendingSettingsAckImpl s
197197
198- foreign import pendingSettingsAckImpl :: forall peer . EffectFn1 (Http2Session peer ) (Boolean )
198+ foreign import pendingSettingsAckImpl :: forall endpoint . EffectFn1 (Http2Session endpoint ) (Boolean )
199199
200- ping :: forall peer . Http2Session peer -> (Maybe Error -> Milliseconds -> ImmutableBuffer -> Effect Unit ) -> Effect Boolean
200+ ping :: forall endpoint . Http2Session endpoint -> (Maybe Error -> Milliseconds -> ImmutableBuffer -> Effect Unit ) -> Effect Boolean
201201ping s cb = runEffectFn2 pingImpl s $ mkEffectFn3 \err dur payload ->
202202 cb (toMaybe err) dur payload
203203
204- foreign import pingImpl :: forall peer . EffectFn2 (Http2Session peer ) (EffectFn3 (Nullable Error ) Milliseconds ImmutableBuffer Unit ) (Boolean )
204+ foreign import pingImpl :: forall endpoint . EffectFn2 (Http2Session endpoint ) (EffectFn3 (Nullable Error ) Milliseconds ImmutableBuffer Unit ) (Boolean )
205205
206- pingPayload :: forall peer . Http2Session peer -> ImmutableBuffer -> (Maybe Error -> Milliseconds -> ImmutableBuffer -> Effect Unit ) -> Effect Boolean
206+ pingPayload :: forall endpoint . Http2Session endpoint -> ImmutableBuffer -> (Maybe Error -> Milliseconds -> ImmutableBuffer -> Effect Unit ) -> Effect Boolean
207207pingPayload s buf cb = runEffectFn3 pingPayloadImpl s buf $ mkEffectFn3 \err dur payload ->
208208 cb (toMaybe err) dur payload
209209
210- foreign import pingPayloadImpl :: forall peer . EffectFn3 (Http2Session peer ) ImmutableBuffer (EffectFn3 (Nullable Error ) Milliseconds ImmutableBuffer Unit ) (Boolean )
210+ foreign import pingPayloadImpl :: forall endpoint . EffectFn3 (Http2Session endpoint ) ImmutableBuffer (EffectFn3 (Nullable Error ) Milliseconds ImmutableBuffer Unit ) (Boolean )
211211
212- ref :: forall peer . Http2Session peer -> Effect Socket
212+ ref :: forall endpoint . Http2Session endpoint -> Effect Socket
213213ref s = runEffectFn1 refImpl s
214214
215- foreign import refImpl :: forall peer . EffectFn1 (Http2Session peer ) (Socket )
215+ foreign import refImpl :: forall endpoint . EffectFn1 (Http2Session endpoint ) (Socket )
216216
217- remoteSettings :: forall peer . Http2Session peer -> Effect Settings
217+ remoteSettings :: forall endpoint . Http2Session endpoint -> Effect Settings
218218remoteSettings s = runEffectFn1 remoteSettingsImpl s
219219
220- foreign import remoteSettingsImpl :: forall peer . EffectFn1 (Http2Session peer ) (Settings )
220+ foreign import remoteSettingsImpl :: forall endpoint . EffectFn1 (Http2Session endpoint ) (Settings )
221221
222- setLocalWindowSize :: forall peer . Http2Session peer -> Int -> Effect Unit
222+ setLocalWindowSize :: forall endpoint . Http2Session endpoint -> Int -> Effect Unit
223223setLocalWindowSize s windowSize = runEffectFn2 setLocalWindowSizeImpl s windowSize
224224
225- foreign import setLocalWindowSizeImpl :: forall peer . EffectFn2 (Http2Session peer ) (Int ) (Unit )
225+ foreign import setLocalWindowSizeImpl :: forall endpoint . EffectFn2 (Http2Session endpoint ) (Int ) (Unit )
226226
227- setTimeout :: forall peer . Http2Session peer -> Milliseconds -> Effect Unit -> Effect Unit
227+ setTimeout :: forall endpoint . Http2Session endpoint -> Milliseconds -> Effect Unit -> Effect Unit
228228setTimeout s msecs cb = runEffectFn3 setTimeoutImpl s msecs cb
229229
230- foreign import setTimeoutImpl :: forall peer . EffectFn3 (Http2Session peer ) (Milliseconds ) (Effect Unit ) (Unit )
230+ foreign import setTimeoutImpl :: forall endpoint . EffectFn3 (Http2Session endpoint ) (Milliseconds ) (Effect Unit ) (Unit )
231231
232- settings :: forall peer . Http2Session peer -> Settings -> (Maybe Error -> Settings -> Int -> Effect Unit ) -> Effect Unit
232+ settings :: forall endpoint . Http2Session endpoint -> Settings -> (Maybe Error -> Settings -> Int -> Effect Unit ) -> Effect Unit
233233settings s set cb = runEffectFn3 settingsImpl s set $ mkEffectFn3 \err set' duration ->
234234 cb (toMaybe err) set' duration
235235
236- foreign import settingsImpl :: forall peer . EffectFn3 (Http2Session peer ) (Settings ) (EffectFn3 (Nullable Error ) Settings Int Unit ) (Unit )
236+ foreign import settingsImpl :: forall endpoint . EffectFn3 (Http2Session endpoint ) (Settings ) (EffectFn3 (Nullable Error ) Settings Int Unit ) (Unit )
237237
238- socket :: forall peer . Http2Session peer -> Effect Socket
238+ socket :: forall endpoint . Http2Session endpoint -> Effect Socket
239239socket s = runEffectFn1 socketImpl s
240240
241- foreign import socketImpl :: forall peer . EffectFn1 (Http2Session peer ) (Socket )
241+ foreign import socketImpl :: forall endpoint . EffectFn1 (Http2Session endpoint ) (Socket )
242242
243243-- | `effectiveLocalWindowSize` <number> The current local (receive) flow control window size for the Http2Session peer.
244244-- | `effectiveRecvDataLength` <number> The current number of bytes that have been received since the last flow control WINDOW_UPDATE.
@@ -261,20 +261,20 @@ type Http2SessionState =
261261 , inflateDynamicTableSize :: Int
262262 }
263263
264- state :: forall peer . Http2Session peer -> Effect Http2SessionState
264+ state :: forall endpoint . Http2Session endpoint -> Effect Http2SessionState
265265state s = runEffectFn1 stateImpl s
266266
267- foreign import stateImpl :: forall peer . EffectFn1 (Http2Session peer ) (Http2SessionState )
267+ foreign import stateImpl :: forall endpoint . EffectFn1 (Http2Session endpoint ) (Http2SessionState )
268268
269- type_ :: forall peer . Http2Session peer -> Int
269+ type_ :: forall endpoint . Http2Session endpoint -> Int
270270type_ = runFn1 typeImpl
271271
272- foreign import typeImpl :: forall peer . Fn1 (Http2Session peer ) Int
272+ foreign import typeImpl :: forall endpoint . Fn1 (Http2Session endpoint ) Int
273273
274- unref :: forall peer . Http2Session peer -> Effect Socket
274+ unref :: forall endpoint . Http2Session endpoint -> Effect Socket
275275unref s = runEffectFn1 unrefImpl s
276276
277- foreign import unrefImpl :: forall peer . EffectFn1 (Http2Session peer ) (Socket )
277+ foreign import unrefImpl :: forall endpoint . EffectFn1 (Http2Session endpoint ) (Socket )
278278
279279altsvc :: Http2Session Server -> String -> Either Int String -> Effect Unit
280280altsvc s alt originOrStream = case originOrStream of
0 commit comments