a subtle bug surfaced when trying multiple individual requests on the
same persistent session, where the connection was being removed from the
watchable connections after each request, but kept in the pool; on the
next request, it would set the same session callbacks; this would go on
and on until connections would get exhausted, after which all of these
callbacks would have to be called.
fixed by having a new callbacks interface, #only, which discards
existing callbacks by type, thereby ensuring there's only one of the
kind.
calls are proxies which can access response metadata as it arrives. For
instance, it's possible to now get metadata (which are http headers)
before the response is fully streamed. #trailing_metadata will also be
empty until the response has been fully processed.
This builds on top of the stream plugin improvements foundation.
there was a long-standing buggy workaround, whereas in stream-mode, when
there was no response yet to query from, a synchronous request would be
fired. This would break when under event streams, so we had to document
this as "make sure that...".
This fixes it by implementing a general session API convention, which
separates the step of sending the requests, from waiting for its
receival. And, given that the request knows when the response is
available, we can actually "tick until response".
This might be used in the future to refactor the way we handle the
responses, which buffer the full payload by default, instead of reading
from the connection at will.
windows udp sockets return WSAEINVAL if recvfrom_nonblock is called when
unbounded, ie. when not bound to an address in listener mode, nor before
actually sending data, which is our case.
This fix works the same way as HTTP connections, i.e. by avoiding
read/write operations when there's no need. This can also give us some
performance.
Fixes#36
this was causing some unfortunate loops around the tcp connect, and
judging by the history, it's solving an issue related to the https
resolver, which has changed and stabilized significantly.
while adding tests, found out that io as hash of authority => io wasn't
working due to missing uri extensions. Made sure the same works for unix
sockets.