proxygen
folly::EmptyReadCallback Class Reference

#include <AsyncSSLSocketTest.h>

Inheritance diagram for folly::EmptyReadCallback:
folly::ReadCallback folly::ReadCallbackBase folly::AsyncReader::ReadCallback

Public Member Functions

 EmptyReadCallback ()
 
void readErr (const AsyncSocketException &ex) noexceptoverride
 
void readEOF () noexceptoverride
 
- Public Member Functions inherited from folly::ReadCallback
 ReadCallback (WriteCallbackBase *wcb)
 
 ~ReadCallback () override
 
void getReadBuffer (void **bufReturn, size_t *lenReturn) override
 
void readDataAvailable (size_t len) noexceptoverride
 
- Public Member Functions inherited from folly::ReadCallbackBase
 ReadCallbackBase (WriteCallbackBase *wcb)
 
 ~ReadCallbackBase () override
 
void setSocket (const std::shared_ptr< AsyncSSLSocket > &socket)
 
void setState (StateEnum s)
 
- Public Member Functions inherited from folly::AsyncReader::ReadCallback
virtual bool isBufferMovable () noexcept
 
virtual size_t maxBufferSize () const
 
virtual void readBufferAvailable (std::unique_ptr< IOBuf >) noexcept
 

Public Attributes

std::shared_ptr< AsyncSockettcpSocket_
 
- Public Attributes inherited from folly::ReadCallback
std::vector< Bufferbuffers
 
Buffer currentBuffer
 
- Public Attributes inherited from folly::ReadCallbackBase
std::shared_ptr< AsyncSSLSocketsocket_
 
WriteCallbackBasewcb_
 
StateEnum state
 

Detailed Description

Definition at line 455 of file AsyncSSLSocketTest.h.

Constructor & Destructor Documentation

folly::EmptyReadCallback::EmptyReadCallback ( )
inlineexplicit

Definition at line 457 of file AsyncSSLSocketTest.h.

457 : ReadCallback(nullptr) {}
ReadCallback(WriteCallbackBase *wcb)

Member Function Documentation

void folly::EmptyReadCallback::readEOF ( )
inlineoverridevirtualnoexcept

readEOF() will be invoked when the transport is closed.

The read callback will be automatically uninstalled immediately before readEOF() is invoked.

Reimplemented from folly::ReadCallbackBase.

Definition at line 467 of file AsyncSSLSocketTest.h.

References folly::STATE_SUCCEEDED.

467  {
468  std::cerr << "readEOF" << std::endl;
469  if (tcpSocket_) {
470  tcpSocket_->close();
471  }
473  }
std::shared_ptr< AsyncSocket > tcpSocket_
state
Definition: http_parser.c:272
void folly::EmptyReadCallback::readErr ( const AsyncSocketException ex)
inlineoverridevirtualnoexcept

readError() will be invoked if an error occurs reading from the transport.

The read callback will be automatically uninstalled immediately before readError() is invoked.

Parameters
exAn exception describing the error that occurred.

Reimplemented from folly::ReadCallbackBase.

Definition at line 459 of file AsyncSSLSocketTest.h.

References folly::STATE_FAILED.

459  {
460  std::cerr << "readError " << ex.what() << std::endl;
462  if (tcpSocket_) {
463  tcpSocket_->close();
464  }
465  }
std::shared_ptr< AsyncSocket > tcpSocket_
state
Definition: http_parser.c:272

Member Data Documentation

std::shared_ptr<AsyncSocket> folly::EmptyReadCallback::tcpSocket_

Definition at line 475 of file AsyncSSLSocketTest.h.

Referenced by folly::TEST().


The documentation for this class was generated from the following file: