Decodes a ReplyHeader from a Buf.
Decodes a ReplyHeader from a Buf.
a Request Record
a Buf to decode
Future[ResponsePacket]
Decodes a response with a Buf using a response decoder.
Decodes a response with a Buf using a response decoder.
the response's type
a request record
the Buf to decode
a response decoder
a Future[ResponsePacket]
This function will try to decode the buffer depending if a request is waiting for a response or not.
This function will try to decode the buffer depending if a request is waiting for a response or not. In case there is a request, it will try to decode with readFromRequest, if an exception is thrown then it will try again with readFromHeader.
expected request description
current buffer
If a request is expected, this function will be called first the expected response's opCode is matched, so that we have the correct way to decode.
If a request is expected, this function will be called first the expected response's opCode is matched, so that we have the correct way to decode. The header is decoded first, the resulting header is checked with checkAssociation to make sure both xids are equal. The body is decoded next and sent with the header in a Future. If any exception is thrown then the readFromHeader will be called.
expected request
current buffer reader
a Try of Future[ResponsePacket]
Decodes a watch event from a Buf
Decodes a watch event from a Buf
a Buf to decode
a Try of Future[ResponsePacket]