ninenines / gun

HTTP/1.1, HTTP/2, Websocket client (and more) for Erlang/OTP.
ISC License
891 stars 232 forks source link

Use a map for HTTP/2 streams #213

Closed essen closed 4 years ago

essen commented 4 years ago

I think it should have a map #{streamid() => #stream{}} and another map #{ref() => streamid()}, acting as an index. I suspect there's more needs to lookup by streamid() rather than ref() because many requests do not stream their request body and so there's no lookup needed for them. There might be flow control but that should happen less than receiving data.

essen commented 4 years ago

Done.