Account
Beamlib 3.3.4 This is the Beam C++ class library. |
Loading...
Searching...
No Matches
BSocket Class Reference
A network communications socket. More...
#include <BSocket.h>
Inheritance diagram for BSocket:

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 | sendChunks (const BDataChunk *chunks, BSize nChunks, 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) |
BUInt | recvAvailable () |
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) |
Detailed Description
A network communications socket.
Member Enumeration Documentation
◆ NType
enum BSocket::NType |
◆ Priority
enum BSocket::Priority |
Constructor & Destructor Documentation
◆ BSocket() [1/4]
BSocket::BSocket | ( | ) |
◆ BSocket() [2/4]
BSocket::BSocket | ( | int | fd | ) |
◆ BSocket() [3/4]
BSocket::BSocket | ( | NType | type | ) |
◆ BSocket() [4/4]
BSocket::BSocket | ( | int | domain, |
int | type, | ||
int | protocol | ||
) |
◆ ~BSocket()
BSocket::~BSocket | ( | ) |
Member Function Documentation
◆ init() [1/2]
BError BSocket::init | ( | int | domain, |
int | type, | ||
int | protocol | ||
) |
◆ init() [2/2]
◆ setFd()
void BSocket::setFd | ( | int | fd | ) |
◆ getFd()
int BSocket::getFd | ( | ) |
◆ bind()
BError BSocket::bind | ( | const BSocketAddress & | add | ) |
◆ connect()
BError BSocket::connect | ( | const BSocketAddress & | add | ) |
◆ shutdown()
BError BSocket::shutdown | ( | int | how | ) |
◆ close()
BError BSocket::close | ( | ) |
◆ listen()
BError BSocket::listen | ( | int | backlog = 5 | ) |
◆ accept() [1/2]
BError BSocket::accept | ( | int & | fd | ) |
◆ accept() [2/2]
BError BSocket::accept | ( | int & | fd, |
BSocketAddress & | address | ||
) |
◆ send()
◆ sendTo()
BError BSocket::sendTo | ( | const BSocketAddress & | address, |
const void * | buf, | ||
BSize | nbytes, | ||
BSize & | nbytesSent, | ||
int | flags = 0 | ||
) |
◆ sendChunks()
BError BSocket::sendChunks | ( | const BDataChunk * | chunks, |
BSize | nChunks, | ||
BSize & | nbytesSent, | ||
int | flags = 0 | ||
) |
◆ recv()
◆ recvFrom()
BError BSocket::recvFrom | ( | BSocketAddress & | address, |
void * | buf, | ||
BSize | maxbytes, | ||
BSize & | nbytesRecv, | ||
int | flags = 0 | ||
) |
◆ recvWithTimeout()
BError BSocket::recvWithTimeout | ( | void * | buf, |
BSize | maxbytes, | ||
BSize & | nbytesRecv, | ||
int | timeout, | ||
int | flags = 0 | ||
) |
◆ recvFromWithTimeout()
BError BSocket::recvFromWithTimeout | ( | BSocketAddress & | address, |
void * | buf, | ||
BSize | maxbytes, | ||
BSize & | nbytesRecv, | ||
int | timeout, | ||
int | flags = 0 | ||
) |
◆ recvAvailable()
BUInt BSocket::recvAvailable | ( | ) |
◆ setSockOpt()
BError BSocket::setSockOpt | ( | int | level, |
int | optname, | ||
void * | optval, | ||
unsigned int | optlen | ||
) |
◆ getSockOpt()
BError BSocket::getSockOpt | ( | int | level, |
int | optname, | ||
void * | optval, | ||
unsigned int * | optlen | ||
) |
◆ setReuseAddress()
BError BSocket::setReuseAddress | ( | int | on | ) |
◆ setBroadCast()
BError BSocket::setBroadCast | ( | int | on | ) |
◆ setPriority()
◆ getMTU()
BError BSocket::getMTU | ( | uint32_t & | mtu | ) |
◆ getAddress()
BError BSocket::getAddress | ( | BSocketAddress & | address | ) |
The documentation for this class was generated from the following files:
Generated by