Public Member Functions | Protected Member Functions | Private Attributes | List of all members
URStream Class Reference

#include <stream.h>

Inheritance diagram for URStream:
Inheritance graph
[legend]

Public Member Functions

bool closed ()
 
bool connect ()
 
void disconnect ()
 
bool read (uint8_t *buf, size_t buf_len, size_t &read)
 
 URStream (std::string &host, int port)
 
bool write (const uint8_t *buf, size_t buf_len, size_t &written)
 
- Public Member Functions inherited from TCPSocket
void close ()
 
std::string getIP ()
 
int getSocketFD ()
 
SocketState getState ()
 
bool read (char *character)
 
bool read (uint8_t *buf, size_t buf_len, size_t &read)
 
bool setSocketFD (int socket_fd)
 
 TCPSocket ()
 
bool write (const uint8_t *buf, size_t buf_len, size_t &written)
 
virtual ~TCPSocket ()
 

Protected Member Functions

virtual bool open (int socket_fd, struct sockaddr *address, size_t address_len)
 
- Protected Member Functions inherited from TCPSocket
virtual void setOptions (int socket_fd)
 
bool setup (std::string &host, int port)
 

Private Attributes

std::string host_
 
int port_
 
std::mutex read_mutex_
 
std::mutex write_mutex_
 

Detailed Description

Definition at line 29 of file stream.h.

Constructor & Destructor Documentation

URStream::URStream ( std::string &  host,
int  port 
)
inline

Definition at line 43 of file stream.h.

Member Function Documentation

bool URStream::closed ( )
inline

Definition at line 57 of file stream.h.

bool URStream::connect ( )
inline

Definition at line 47 of file stream.h.

void URStream::disconnect ( )
inline

Definition at line 51 of file stream.h.

virtual bool URStream::open ( int  socket_fd,
struct sockaddr *  address,
size_t  address_len 
)
inlineprotectedvirtual

Reimplemented from TCPSocket.

Definition at line 37 of file stream.h.

bool URStream::read ( uint8_t *  buf,
size_t  buf_len,
size_t &  read 
)

Definition at line 33 of file stream.cpp.

bool URStream::write ( const uint8_t *  buf,
size_t  buf_len,
size_t &  written 
)

Definition at line 27 of file stream.cpp.

Member Data Documentation

std::string URStream::host_
private

Definition at line 32 of file stream.h.

int URStream::port_
private

Definition at line 33 of file stream.h.

std::mutex URStream::read_mutex_
private

Definition at line 34 of file stream.h.

std::mutex URStream::write_mutex_
private

Definition at line 34 of file stream.h.


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


ur_modern_driver
Author(s): Thomas Timm Andersen, Simon Rasmussen
autogenerated on Fri Jun 26 2020 03:37:01