LibTmsApi  2.0.0
Public Types | Public Member Functions | Private Attributes | List of all members
BSocket Class Reference

#include <BSocket.h>

Inheritance diagram for BSocket:
BoapClientObject BoapClientObject BoapSignalObject BoapSignalObject Boapns::Boapns Tms::PuControl Tms::PuProcess Tms::TmsControl Tms::TmsEvent Tms::TmsProcess Boapns::Boapns Tms::PuControl Tms::PuProcess Tms::TmsControl Tms::TmsEvent Tms::TmsProcess

Public Types

enum  NType { STREAM, DGRAM }
 
enum  Priority { PriorityLow, PriorityNormal, PriorityHigh }
 

Public Member Functions

 BSocket ()
 
 BSocket (int fd)
 
 BSocket (NType type)
 
 BSocket (int domain, int type, int protocol)
 
 ~BSocket ()
 
BError init (int domain, int type, int protocol)
 
BError init (NType type)
 
void setFd (int fd)
 
int getFd ()
 
BError bind (const BSocketAddress &add)
 
BError connect (const BSocketAddress &add)
 
BError shutdown (int how)
 
BError close ()
 
BError listen (int backlog=5)
 
BError accept (int &fd)
 
BError accept (int &fd, BSocketAddress &address)
 
BError send (const void *buf, BSize nbytes, BSize &nbytesSent, int flags=0)
 
BError sendTo (const BSocketAddress &address, const void *buf, BSize nbytes, BSize &nbytesSent, int flags=0)
 
BError recv (void *buf, BSize maxbytes, BSize &nbytesRecv, int flags=0)
 
BError recvFrom (BSocketAddress &address, void *buf, BSize maxbytes, BSize &nbytesRecv, int flags=0)
 
BError recvWithTimeout (void *buf, BSize maxbytes, BSize &nbytesRecv, int timeout, int flags=0)
 
BError recvFromWithTimeout (BSocketAddress &address, void *buf, BSize maxbytes, BSize &nbytesRecv, int timeout, int flags=0)
 
BError setSockOpt (int level, int optname, void *optval, unsigned int optlen)
 
BError getSockOpt (int level, int optname, void *optval, unsigned int *optlen)
 
BError setReuseAddress (int on)
 
BError setBroadCast (int on)
 
BError setPriority (Priority priority)
 
BError getMTU (uint32_t &mtu)
 
BError getAddress (BSocketAddress &address)
 

Private Attributes

int osocket
 

Member Enumeration Documentation

Enumerator
STREAM 
DGRAM 
Enumerator
PriorityLow 
PriorityNormal 
PriorityHigh 

Constructor & Destructor Documentation

BSocket::BSocket ( )
BSocket::BSocket ( int  fd)
BSocket::BSocket ( NType  type)
BSocket::BSocket ( int  domain,
int  type,
int  protocol 
)
BSocket::~BSocket ( )

Member Function Documentation

BError BSocket::accept ( int &  fd)
BError BSocket::accept ( int &  fd,
BSocketAddress address 
)
BError BSocket::bind ( const BSocketAddress add)
BError BSocket::close ( )
BError BSocket::connect ( const BSocketAddress add)
BError BSocket::getAddress ( BSocketAddress address)
int BSocket::getFd ( )
BError BSocket::getMTU ( uint32_t &  mtu)
BError BSocket::getSockOpt ( int  level,
int  optname,
void *  optval,
unsigned int *  optlen 
)
BError BSocket::init ( int  domain,
int  type,
int  protocol 
)
BError BSocket::init ( NType  type)
BError BSocket::listen ( int  backlog = 5)
BError BSocket::recv ( void *  buf,
BSize  maxbytes,
BSize nbytesRecv,
int  flags = 0 
)
BError BSocket::recvFrom ( BSocketAddress address,
void *  buf,
BSize  maxbytes,
BSize nbytesRecv,
int  flags = 0 
)
BError BSocket::recvFromWithTimeout ( BSocketAddress address,
void *  buf,
BSize  maxbytes,
BSize nbytesRecv,
int  timeout,
int  flags = 0 
)
BError BSocket::recvWithTimeout ( void *  buf,
BSize  maxbytes,
BSize nbytesRecv,
int  timeout,
int  flags = 0 
)
BError BSocket::send ( const void *  buf,
BSize  nbytes,
BSize nbytesSent,
int  flags = 0 
)
BError BSocket::sendTo ( const BSocketAddress address,
const void *  buf,
BSize  nbytes,
BSize nbytesSent,
int  flags = 0 
)
BError BSocket::setBroadCast ( int  on)
void BSocket::setFd ( int  fd)
BError BSocket::setPriority ( Priority  priority)
BError BSocket::setReuseAddress ( int  on)
BError BSocket::setSockOpt ( int  level,
int  optname,
void *  optval,
unsigned int  optlen 
)
BError BSocket::shutdown ( int  how)

Member Data Documentation

int BSocket::osocket
private

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