#include <BSocket.h>
Inheritance diagram for BSocket:
Public Types | |
enum | NType { STREAM, DGRAM } |
Public Member Functions | |
BSocket () | |
BSocket (int fd) | |
BSocket (NType type) | |
~BSocket () | |
BError | init (NType type) |
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 | 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 | getMTU (uint32_t &mtu) |
BError | getAddress (BSocketAddress &address) |
Private Attributes | |
int | osocket |
enum BSocket::NType |
BSocket::BSocket | ( | ) |
BSocket::BSocket | ( | int | fd | ) |
BSocket::BSocket | ( | NType | type | ) |
BSocket::~BSocket | ( | ) |
int BSocket::getFd | ( | ) |
BError BSocket::bind | ( | const BSocketAddress & | add | ) |
BError BSocket::connect | ( | const BSocketAddress & | add | ) |
BError BSocket::shutdown | ( | int | how | ) |
BError BSocket::close | ( | ) |
BError BSocket::listen | ( | int | backlog = 5 |
) |
BError BSocket::accept | ( | int & | fd | ) |
BError BSocket::accept | ( | int & | fd, | |
BSocketAddress & | address | |||
) |
BError BSocket::sendTo | ( | const BSocketAddress & | address, | |
const void * | buf, | |||
BSize | nbytes, | |||
BSize & | nbytesSent, | |||
int | flags = 0 | |||
) |
BError BSocket::recvFrom | ( | BSocketAddress & | address, | |
void * | buf, | |||
BSize | maxbytes, | |||
BSize & | nbytesRecv, | |||
int | flags = 0 | |||
) |
BError BSocket::setSockOpt | ( | int | level, | |
int | optname, | |||
void * | optval, | |||
unsigned int | optlen | |||
) |
BError BSocket::getSockOpt | ( | int | level, | |
int | optname, | |||
void * | optval, | |||
unsigned int * | optlen | |||
) |
BError BSocket::setReuseAddress | ( | int | on | ) |
BError BSocket::setBroadCast | ( | int | on | ) |
BError BSocket::getMTU | ( | uint32_t & | mtu | ) |
BError BSocket::getAddress | ( | BSocketAddress & | address | ) |
int BSocket::osocket [private] |