ESP8266
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
ClientContext Class Reference

Public Member Functions

 ClientContext (tcp_pcb *pcb, discard_cb_t discard_cb, void *discard_cb_arg)
 
err_t abort ()
 
err_t close ()
 
 ~ClientContext ()
 
ClientContextnext () const
 
ClientContextnext (ClientContext *new_next)
 
void ref ()
 
void unref ()
 
void setNoDelay (bool nodelay)
 
bool getNoDelay ()
 
uint32_t getRemoteAddress ()
 
uint16_t getRemotePort ()
 
uint32_t getLocalAddress ()
 
uint16_t getLocalPort ()
 
size_t getSize () const
 
char read ()
 
size_t read (char *dst, size_t size)
 
char peek ()
 
size_t peekBytes (char *dst, size_t size)
 
void flush ()
 
uint8_t state () const
 
size_t write (const char *data, size_t size)
 

Private Member Functions

err_t _sent (tcp_pcb *pcb, uint16_t len)
 
void _consume (size_t size)
 
err_t _recv (tcp_pcb *pcb, pbuf *pb, err_t err)
 
void _error (err_t err)
 
err_t _poll (tcp_pcb *pcb)
 

Static Private Member Functions

static err_t _s_recv (void *arg, struct tcp_pcb *tpcb, struct pbuf *pb, err_t err)
 
static void _s_error (void *arg, err_t err)
 
static err_t _s_poll (void *arg, struct tcp_pcb *tpcb)
 
static err_t _s_sent (void *arg, struct tcp_pcb *tpcb, uint16_t len)
 

Private Attributes

tcp_pcb * _pcb
 
pbuf_rx_buf
 
size_t _rx_buf_offset
 
discard_cb_t _discard_cb
 
void * _discard_cb_arg
 
int _refcnt
 
ClientContext_next
 
size_t _size_sent
 
bool _send_waiting
 

Constructor & Destructor Documentation

ClientContext::ClientContext ( tcp_pcb *  pcb,
discard_cb_t  discard_cb,
void *  discard_cb_arg 
)
ClientContext::~ClientContext ( )

Member Function Documentation

void ClientContext::_consume ( size_t  size)
private
void ClientContext::_error ( err_t  err)
private
err_t ClientContext::_poll ( tcp_pcb *  pcb)
private
err_t ClientContext::_recv ( tcp_pcb *  pcb,
pbuf pb,
err_t  err 
)
private
static void ClientContext::_s_error ( void *  arg,
err_t  err 
)
staticprivate
static err_t ClientContext::_s_poll ( void *  arg,
struct tcp_pcb *  tpcb 
)
staticprivate
static err_t ClientContext::_s_recv ( void *  arg,
struct tcp_pcb *  tpcb,
struct pbuf pb,
err_t  err 
)
staticprivate
static err_t ClientContext::_s_sent ( void *  arg,
struct tcp_pcb *  tpcb,
uint16_t  len 
)
staticprivate
err_t ClientContext::_sent ( tcp_pcb *  pcb,
uint16_t  len 
)
private
err_t ClientContext::abort ( )
err_t ClientContext::close ( )
void ClientContext::flush ( )
uint32_t ClientContext::getLocalAddress ( )
uint16_t ClientContext::getLocalPort ( )
bool ClientContext::getNoDelay ( )
uint32_t ClientContext::getRemoteAddress ( )
uint16_t ClientContext::getRemotePort ( )
size_t ClientContext::getSize ( void  ) const
ClientContext* ClientContext::next ( ) const
ClientContext* ClientContext::next ( ClientContext new_next)
char ClientContext::peek ( )
size_t ClientContext::peekBytes ( char *  dst,
size_t  size 
)
char ClientContext::read ( )
size_t ClientContext::read ( char *  dst,
size_t  size 
)
void ClientContext::ref ( )
void ClientContext::setNoDelay ( bool  nodelay)
uint8_t ClientContext::state ( ) const
void ClientContext::unref ( )
size_t ClientContext::write ( const char *  data,
size_t  size 
)

Member Data Documentation

discard_cb_t ClientContext::_discard_cb
private
void* ClientContext::_discard_cb_arg
private
ClientContext* ClientContext::_next
private
tcp_pcb* ClientContext::_pcb
private
int ClientContext::_refcnt
private
pbuf* ClientContext::_rx_buf
private
size_t ClientContext::_rx_buf_offset
private
bool ClientContext::_send_waiting
private
size_t ClientContext::_size_sent
private