OpenZWave Library: OpenZWave::SimpleHTTPClient::TcpSocket Class Reference

| OpenZWave Library 1.6.0

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
OpenZWave::SimpleHTTPClient::TcpSocket Class Referenceabstract
Basic HTTP(s) Client

a TCP Socket that can optionally be protected via SSL More...

`#include <HttpClient.h>`

Inheritance diagram for OpenZWave::SimpleHTTPClient::TcpSocket:

## Public Member Functions
| TcpSocket ()
virtual | ~TcpSocket ()
virtual bool | HasPendingTask () const
bool | open (const char *addr=NULL, unsigned int port=0)
void | close ()
bool | update ()
bool | isOpen (void)
void | SetBufsizeIn (unsigned int s)
bool | SetNonBlocking (bool nonblock)
unsigned int | GetBufSize ()
const char * | GetHost (void)
bool | SendBytes (const void *buf, unsigned int len)
bool | initSSL (const char *certs)
bool | hasSSL () const
void | shutdownSSL ()
SSLResult | verifySSL ()

## Protected Member Functions
virtual void | _OnCloseInternal ()
virtual void | _OnData ()
virtual void | _OnRecv (void *buf, unsigned int size)=0
virtual void | _OnClose ()
virtual void | _OnOpen ()
virtual bool | _OnUpdate ()
void | _ShiftBuffer ()

## Protected Attributes
char * | _inbuf
char * | _readptr
char * | _writeptr
unsigned int | _inbufSize
unsigned int | _writeSize
unsigned int | _recvSize
unsigned int | _lastport
bool | _nonblocking
long | _s
std::string | _host

## Detailed Description

a TCP Socket that can optionally be protected via SSL

This represents a TCP Socket that can be encrypted via SSL and is used to connect to a TCP Server (in this case, a HTTP(s) Server

## Constructor & Destructor Documentation

## ◆ TcpSocket()

OpenZWave::SimpleHTTPClient::TcpSocket::TcpSocket | ( |  | ) |

## ◆ ~TcpSocket()

OpenZWave::SimpleHTTPClient::TcpSocket::~TcpSocket | ( |  | ) |
| virtual

## Member Function Documentation

## ◆ _OnClose()

virtual void OpenZWave::SimpleHTTPClient::TcpSocket::_OnClose | ( |  | ) |
| inlineprotectedvirtual

Reimplemented in OpenZWave::SimpleHTTPClient::HttpSocket.

## ◆ _OnCloseInternal()

void OpenZWave::SimpleHTTPClient::TcpSocket::_OnCloseInternal | ( |  | ) |
| protectedvirtual

Reimplemented in OpenZWave::SimpleHTTPClient::HttpSocket.

## ◆ _OnData()

void OpenZWave::SimpleHTTPClient::TcpSocket::_OnData | ( |  | ) |
| protectedvirtual

Reimplemented in OpenZWave::SimpleHTTPClient::HttpSocket.

## ◆ _OnOpen()

virtual void OpenZWave::SimpleHTTPClient::TcpSocket::_OnOpen | ( |  | ) |
| inlineprotectedvirtual

Reimplemented in OpenZWave::SimpleHTTPClient::HttpSocket.

## ◆ _OnRecv()

virtual void OpenZWave::SimpleHTTPClient::TcpSocket::_OnRecv | ( | void * | buf,
|  | unsigned int | size
| ) |  |
| protectedpure virtual

Implemented in OpenZWave::SimpleHTTPClient::HttpSocket.

## ◆ _OnUpdate()

virtual bool OpenZWave::SimpleHTTPClient::TcpSocket::_OnUpdate | ( |  | ) |
| inlineprotectedvirtual

Reimplemented in OpenZWave::SimpleHTTPClient::HttpSocket.

## ◆ _ShiftBuffer()

void OpenZWave::SimpleHTTPClient::TcpSocket::_ShiftBuffer | ( |  | ) |
| protected

## ◆ close()

void OpenZWave::SimpleHTTPClient::TcpSocket::close | ( |  | ) |

## ◆ GetBufSize()

unsigned int OpenZWave::SimpleHTTPClient::TcpSocket::GetBufSize | ( |  | ) |
| inline

## ◆ GetHost()

const char * OpenZWave::SimpleHTTPClient::TcpSocket::GetHost | ( | void |  | ) |
| inline

## ◆ HasPendingTask()

virtual bool OpenZWave::SimpleHTTPClient::TcpSocket::HasPendingTask | ( |  | ) | const
| inlinevirtual

Reimplemented in OpenZWave::SimpleHTTPClient::HttpSocket.

## ◆ hasSSL()

bool OpenZWave::SimpleHTTPClient::TcpSocket::hasSSL | ( |  | ) | const
| inline

## ◆ initSSL()

bool OpenZWave::SimpleHTTPClient::TcpSocket::initSSL | ( | const char * | certs | ) |

## ◆ isOpen()

bool OpenZWave::SimpleHTTPClient::TcpSocket::isOpen | ( | void |  | ) |

## ◆ open()

bool OpenZWave::SimpleHTTPClient::TcpSocket::open | ( | const char * | addr = `NULL`,
|  | unsigned int | port = `0`
| ) |  |

## ◆ SendBytes()

bool OpenZWave::SimpleHTTPClient::TcpSocket::SendBytes | ( | const void * | buf,
|  | unsigned int | len
| ) |  |

## ◆ SetBufsizeIn()

void OpenZWave::SimpleHTTPClient::TcpSocket::SetBufsizeIn | ( | unsigned int | s | ) |

## ◆ SetNonBlocking()

bool OpenZWave::SimpleHTTPClient::TcpSocket::SetNonBlocking | ( | bool | nonblock | ) |

## ◆ shutdownSSL()

void OpenZWave::SimpleHTTPClient::TcpSocket::shutdownSSL | ( |  | ) |

## ◆ update()

bool OpenZWave::SimpleHTTPClient::TcpSocket::update | ( |  | ) |

## ◆ verifySSL()

SSLResult OpenZWave::SimpleHTTPClient::TcpSocket::verifySSL | ( |  | ) |

## Member Data Documentation

## ◆ _host

std::string OpenZWave::SimpleHTTPClient::TcpSocket::_host
| protected

## ◆ _inbuf

char* OpenZWave::SimpleHTTPClient::TcpSocket::_inbuf
| protected

## ◆ _inbufSize

unsigned int OpenZWave::SimpleHTTPClient::TcpSocket::_inbufSize
| protected

## ◆ _lastport

unsigned int OpenZWave::SimpleHTTPClient::TcpSocket::_lastport
| protected

## ◆ _nonblocking

bool OpenZWave::SimpleHTTPClient::TcpSocket::_nonblocking
| protected

## ◆ _readptr

char* OpenZWave::SimpleHTTPClient::TcpSocket::_readptr
| protected

## ◆ _recvSize

unsigned int OpenZWave::SimpleHTTPClient::TcpSocket::_recvSize
| protected

## ◆ _s

long OpenZWave::SimpleHTTPClient::TcpSocket::_s
| protected

## ◆ _writeptr

char* OpenZWave::SimpleHTTPClient::TcpSocket::_writeptr
| protected

## ◆ _writeSize

unsigned int OpenZWave::SimpleHTTPClient::TcpSocket::_writeSize
| protected

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

- HttpClient.h
- HttpClient.cpp