Robotics Library  0.6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
rl::hal::Socket Class Referenceabstract

#include <Socket.h>

Inheritance diagram for rl::hal::Socket:
Inheritance graph
[legend]
Collaboration diagram for rl::hal::Socket:
Collaboration graph
[legend]

Public Member Functions

 Socket (const ::std::string &host, const unsigned short int &port)
 
virtual ~Socket ()
 
void close ()
 
::std::string getHost () const
 
unsigned short int getPort () const
 
virtual void open ()=0
 
::std::size_t read (void *buf, const ::std::size_t &count)
 
::std::size_t select (const bool &read, const bool &write, const ::rl::math::Real &timeout)
 
::std::size_t write (const void *buf, const ::std::size_t &count)
 
- Public Member Functions inherited from rl::hal::Com
 Com ()
 
virtual ~Com ()
 
bool isConnected () const
 

Protected Member Functions

void connect (const int &domain, const int &type, const int &protocol)
 
- Protected Member Functions inherited from rl::hal::Com
void setConnected (const bool &connected)
 

Private Attributes

::std::string host
 
unsigned short int port
 
int sockfd
 

Constructor & Destructor Documentation

rl::hal::Socket::Socket ( const ::std::string &  host,
const unsigned short int &  port 
)
rl::hal::Socket::~Socket ( )
virtual

Member Function Documentation

void rl::hal::Socket::close ( )
virtual

Implements rl::hal::Com.

void rl::hal::Socket::connect ( const int &  domain,
const int &  type,
const int &  protocol 
)
protected
std::string rl::hal::Socket::getHost ( ) const
unsigned short int rl::hal::Socket::getPort ( ) const
virtual void rl::hal::Socket::open ( )
pure virtual

Implements rl::hal::Com.

Implemented in rl::hal::TcpSocket, and rl::hal::UdpSocket.

std::size_t rl::hal::Socket::read ( void *  buf,
const ::std::size_t &  count 
)
std::size_t rl::hal::Socket::select ( const bool &  read,
const bool &  write,
const ::rl::math::Real timeout 
)
std::size_t rl::hal::Socket::write ( const void *  buf,
const ::std::size_t &  count 
)

Member Data Documentation

::std::string rl::hal::Socket::host
private
unsigned short int rl::hal::Socket::port
private
int rl::hal::Socket::sockfd
private

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