added +int Socket::bindToIfceAddr()

This commit is contained in:
2018-10-18 10:37:00 +00:00
parent 05c2905a0a
commit d3ed032636
4 changed files with 34 additions and 0 deletions

View File

@ -76,10 +76,17 @@ public:
int shutdown (int how = 2) QSE_CPP_NOEXCEPT;
int connect (const SocketAddress& target) QSE_CPP_NOEXCEPT;
int bind (const SocketAddress& target) QSE_CPP_NOEXCEPT;
// bind to the ip address of the interface
int bindToIfceAddr (const qse_mchar_t* ifce, qse_uint16_t port) QSE_CPP_NOEXCEPT;
// bind to the ip address of the interface
int bindToIfceAddr (const qse_wchar_t* ifce, qse_uint16_t port) QSE_CPP_NOEXCEPT;
int listen (int backlog = 128) QSE_CPP_NOEXCEPT;
int accept (Socket* newsck, SocketAddress* newaddr, int traits = 0) QSE_CPP_NOEXCEPT;
// The send() functions sends data by attemping a single call to the
// underlying system calls
qse_ssize_t send (const void* buf, qse_size_t len) QSE_CPP_NOEXCEPT;

View File

@ -66,6 +66,7 @@ public:
void setIpaddr (const qse_ip4ad_t* ipaddr) QSE_CPP_NOEXCEPT;
void setIpaddr (const qse_ip6ad_t* ipaddr) QSE_CPP_NOEXCEPT;
void setIpaddr (qse_uint32_t ipaddr) QSE_CPP_NOEXCEPT;
const qse_ip4ad_t* getIp4addr () const QSE_CPP_NOEXCEPT;
const qse_ip6ad_t* getIp6addr () const QSE_CPP_NOEXCEPT;