Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AsyncSocket: add ReadCallback::ReadMode::ReadRecvZc
Summary: Issue recvzc request in AsyncSocket using the EVB backend. Only IoUringBackend is going to support this. It is expected for the ReadCallback to check and set the ReadMode to ReadRecvZc if this is desired and supported by the backend. There are no checks here in the AsyncSocket. By default `issueRecvZc` will return -1 and this will be converted into an error code. # Context This and the rest of the stack is needed to support peeking done at the crypto layer in wangle::Acceptor to determine things like StopTLS and at the Thrift layer to determine the protocol. 9 bytes are peeked for crypto and 13 bytes are peeked for Thrift. The peeking happens early on before an AsyncIoUringSocket is created on top of AsyncSSLSocket. Prior to this, the only way to read a socket configured for io_uring zc rx is via AsyncIoUringSocket. Reviewed By: dmm-fb Differential Revision: D70057958 fbshipit-source-id: ef0b4e7c03ac765c2606b10f73ac423f008e51b3
- Loading branch information