18 #ifndef ADDRESS_INFO_H
45 bool theCheckedRead,
bool theCheckedWrite,
bool theCheckedError,
46 bool theReadyToRead,
bool theReadyToWrite,
bool theReadyWithError
68 typedef std::shared_ptr<Socket>
Ptr;
80 static Socket::Ptr create(std::shared_ptr<Address> theAddress,
int existingLowLevelSocket);
87 Socket(std::shared_ptr<Address> theAddress);
95 Socket(std::shared_ptr<Address> theAddress,
int existingLowLevelSocket);
112 SelectResult select(
int timeout_ms,
bool checkRead,
bool checkWrite,
bool checkError);
121 short poll(
int timeout_ms,
short eventsToLookFor);
134 ssize_t
send(
const void* buffer,
size_t length,
int flags = 0)
const;
146 ssize_t
receive(
void *buffer,
size_t length,
int flags = 0)
const;
167 void getSocketOption(
int level,
int optionName,
void* optionValue, socklen_t* optionLength)
const;
177 void setSocketOption(
int level,
int optionName,
const void* optionValue, socklen_t optionLength)
const;
188 const int lowLevelSocket;
191 std::shared_ptr<Address> address;
Result of Socket::select() indicating the result status.
SelectResult(bool theCheckedRead, bool theCheckedWrite, bool theCheckedError, bool theReadyToRead, bool theReadyToWrite, bool theReadyWithError)
const bool readyWithError
BSD Socket base class providing the basic, common functionality between ServerSockets and ClientSocke...
static Socket::Ptr create(std::shared_ptr< Address > theAddress, int existingLowLevelSocket)
int getLowLevelSocket() const
short poll(int timeout_ms, short eventsToLookFor)
ssize_t receive(void *buffer, size_t length, int flags=0) const
std::shared_ptr< Socket > Ptr
ssize_t send(const void *buffer, size_t length, int flags=0) const
void setSocketOption(int level, int optionName, const void *optionValue, socklen_t optionLength) const
std::shared_ptr< Address > getAddress() const
void getSocketOption(int level, int optionName, void *optionValue, socklen_t *optionLength) const
Socket(std::shared_ptr< Address > theAddress)
ssize_t blockingReceive(void *buffer, size_t length) const
SelectResult select(int timeout_ms, bool checkRead, bool checkWrite, bool checkError)
Namespace of the BsdSockets library.