added Socket::send() that accepts the source address and sends with sendmsg with IP_PKTINFO/IP6_PKTINFO.

This commit is contained in:
2018-10-24 08:41:56 +00:00
parent c56088d21a
commit 969a03b3c3
2 changed files with 86 additions and 2 deletions

View File

@ -106,8 +106,10 @@ public:
// underlying system calls
qse_ssize_t send (const void* buf, qse_size_t len) QSE_CPP_NOEXCEPT;
qse_ssize_t send (const void* buf, qse_size_t len, const SocketAddress& dstaddr) QSE_CPP_NOEXCEPT;
qse_ssize_t send (const void* buf, qse_size_t len, const SocketAddress& dstaddr, const SocketAddress& srcaddr) QSE_CPP_NOEXCEPT;
qse_ssize_t send (const qse_ioptl_t* vec, int count) QSE_CPP_NOEXCEPT;
qse_ssize_t send (const qse_ioptl_t* vec, int count, const SocketAddress& dstaddr) QSE_CPP_NOEXCEPT;
qse_ssize_t send (const qse_ioptl_t* vec, int count, const SocketAddress& dstaddr, const SocketAddress& srcaddr) QSE_CPP_NOEXCEPT;
// The sendx() functions sends data as much as it can, possibly with multiple
// underlying system calls. these are useful for stream sockets and may not