|
| MOCK_METHOD1 (setReadCB, void(ReadCallback *)) |
|
| MOCK_CONST_METHOD0 (getReadCallback, ReadCallback *()) |
|
| MOCK_CONST_METHOD0 (getReadCB, ReadCallback *()) |
|
| MOCK_METHOD4 (write, void(WriteCallback *, const void *, size_t, WriteFlags)) |
|
| MOCK_METHOD4 (writev, void(WriteCallback *, const iovec *, size_t, WriteFlags)) |
|
| MOCK_METHOD3 (writeChain, void(WriteCallback *, std::shared_ptr< folly::IOBuf >, WriteFlags)) |
|
void | writeChain (WriteCallback *callback, std::unique_ptr< folly::IOBuf > &&iob, WriteFlags flags=WriteFlags::NONE) override |
|
| MOCK_METHOD0 (close, void()) |
|
| MOCK_METHOD0 (closeNow, void()) |
|
| MOCK_METHOD0 (closeWithReset, void()) |
|
| MOCK_METHOD0 (shutdownWrite, void()) |
|
| MOCK_METHOD0 (shutdownWriteNow, void()) |
|
| MOCK_CONST_METHOD0 (good, bool()) |
|
| MOCK_CONST_METHOD0 (readable, bool()) |
|
| MOCK_CONST_METHOD0 (connecting, bool()) |
|
| MOCK_CONST_METHOD0 (error, bool()) |
|
| MOCK_METHOD1 (attachEventBase, void(EventBase *)) |
|
| MOCK_METHOD0 (detachEventBase, void()) |
|
| MOCK_CONST_METHOD0 (isDetachable, bool()) |
|
| MOCK_CONST_METHOD0 (getEventBase, EventBase *()) |
|
| MOCK_METHOD1 (setSendTimeout, void(uint32_t)) |
|
| MOCK_CONST_METHOD0 (getSendTimeout, uint32_t()) |
|
| MOCK_CONST_METHOD1 (getLocalAddress, void(folly::SocketAddress *)) |
|
| MOCK_CONST_METHOD1 (getPeerAddress, void(folly::SocketAddress *)) |
|
| MOCK_CONST_METHOD0 (getAppBytesWritten, size_t()) |
|
| MOCK_CONST_METHOD0 (getRawBytesWritten, size_t()) |
|
| MOCK_CONST_METHOD0 (getAppBytesReceived, size_t()) |
|
| MOCK_CONST_METHOD0 (getRawBytesReceived, size_t()) |
|
| MOCK_CONST_METHOD0 (isEorTrackingEnabled, bool()) |
|
| MOCK_METHOD1 (setEorTracking, void(bool)) |
|
| MOCK_CONST_METHOD0 (getWrappedTransport, AsyncTransportWrapper *()) |
|
| MOCK_CONST_METHOD0 (isReplaySafe, bool()) |
|
| MOCK_METHOD1 (setReplaySafetyCallback, void(AsyncTransport::ReplaySafetyCallback *)) |
|
| MOCK_CONST_METHOD0 (getSecurityProtocol, std::string()) |
|
void | setReadCB (ReadCallback *callback) override=0 |
|
ReadCallback * | getReadCallback () const override=0 |
|
void | write (WriteCallback *callback, const void *buf, size_t bytes, WriteFlags flags=WriteFlags::NONE) override=0 |
|
void | writev (WriteCallback *callback, const iovec *vec, size_t count, WriteFlags flags=WriteFlags::NONE) override=0 |
|
virtual const AsyncTransportWrapper * | getWrappedTransport () const |
|
template<class T > |
const T * | getUnderlyingTransport () const |
|
template<class T > |
T * | getUnderlyingTransport () |
|
virtual void | close ()=0 |
|
virtual void | closeNow ()=0 |
|
virtual void | closeWithReset () |
|
virtual void | shutdownWrite ()=0 |
|
virtual void | shutdownWriteNow ()=0 |
|
virtual bool | good () const =0 |
|
virtual bool | readable () const =0 |
|
virtual bool | writable () const |
|
virtual bool | isPending () const |
|
virtual bool | connecting () const =0 |
|
virtual bool | error () const =0 |
|
virtual void | attachEventBase (EventBase *eventBase)=0 |
|
virtual void | detachEventBase ()=0 |
|
virtual bool | isDetachable () const =0 |
|
virtual void | setSendTimeout (uint32_t milliseconds)=0 |
|
virtual uint32_t | getSendTimeout () const =0 |
|
virtual void | getLocalAddress (SocketAddress *address) const =0 |
|
SocketAddress | getLocalAddress () const |
|
void | getAddress (SocketAddress *address) const override |
|
virtual void | getPeerAddress (SocketAddress *address) const =0 |
|
SocketAddress | getPeerAddress () const |
|
virtual ssl::X509UniquePtr | getPeerCert () const |
|
virtual const X509 * | getSelfCert () const |
|
virtual const AsyncTransportCertificate * | getPeerCertificate () const |
|
virtual const AsyncTransportCertificate * | getSelfCertificate () const |
|
virtual std::string | getApplicationProtocol () const noexcept |
|
virtual std::string | getSecurityProtocol () const |
|
virtual bool | isEorTrackingEnabled () const =0 |
|
virtual void | setEorTracking (bool track)=0 |
|
virtual size_t | getAppBytesWritten () const =0 |
|
virtual size_t | getRawBytesWritten () const =0 |
|
virtual size_t | getAppBytesReceived () const =0 |
|
virtual size_t | getRawBytesReceived () const =0 |
|
virtual bool | isReplaySafe () const |
|
virtual void | setReplaySafetyCallback (ReplaySafetyCallback *callback) |
|
virtual void | destroy () |
|
bool | getDestroyPending () const |
|
virtual | ~DelayedDestructionBase ()=default |
|
virtual EventBase * | getEventBase () const =0 |
|
virtual | ~AsyncSocketBase ()=default |
|
Definition at line 25 of file MockAsyncTransport.h.
If you supply a non-null WriteCallback, exactly one of writeSuccess() or writeErr() will be invoked when the write completes. If you supply the same WriteCallback object for multiple write() calls, it will be invoked exactly once per call. The only way to cancel outstanding write requests is to close the socket (e.g., with closeNow() or shutdownWriteNow()). When closing the socket this way, writeErr() will still be invoked once for each outstanding write operation.
Implements folly::AsyncTransportWrapper.
Definition at line 36 of file MockAsyncTransport.h.
References folly::AsyncTransport::attachEventBase(), folly::AsyncTransport::close(), folly::AsyncTransport::closeNow(), folly::AsyncTransport::closeWithReset(), folly::AsyncTransport::connecting(), folly::AsyncTransport::detachEventBase(), folly::AsyncTransport::error(), folly::AsyncTransport::getAppBytesReceived(), folly::AsyncTransport::getAppBytesWritten(), folly::AsyncSocketBase::getEventBase(), folly::AsyncTransport::getLocalAddress(), folly::AsyncTransport::getPeerAddress(), folly::AsyncTransport::getRawBytesReceived(), folly::AsyncTransport::getRawBytesWritten(), folly::AsyncTransport::getSecurityProtocol(), folly::AsyncTransport::getSendTimeout(), folly::AsyncTransportWrapper::getWrappedTransport(), folly::AsyncTransport::good(), folly::AsyncTransport::isDetachable(), folly::AsyncTransport::isEorTrackingEnabled(), folly::AsyncTransport::isReplaySafe(), MOCK_CONST_METHOD0(), MOCK_CONST_METHOD1(), MOCK_METHOD0(), MOCK_METHOD1(), folly::AsyncTransport::readable(), folly::AsyncTransport::setEorTracking(), folly::AsyncTransport::setReplaySafetyCallback(), folly::AsyncTransport::setSendTimeout(), folly::AsyncTransport::shutdownWrite(), folly::AsyncTransport::shutdownWriteNow(), string, and uint32_t.
40 writeChain(callback, std::shared_ptr<folly::IOBuf>(iob.release()),
flags);
void writeChain(WriteCallback *callback, std::unique_ptr< folly::IOBuf > &&iob, WriteFlags flags=WriteFlags::NONE) override