mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
net: add new method Sock::Bind() that wraps bind()
This will help to increase `Sock` usage and make more code mockable.
This commit is contained in:
parent
7164e00e1b
commit
3ad7de225e
6 changed files with 36 additions and 2 deletions
|
|
@ -74,6 +74,11 @@ int Sock::Connect(const sockaddr* addr, socklen_t addr_len) const
|
|||
return connect(m_socket, addr, addr_len);
|
||||
}
|
||||
|
||||
int Sock::Bind(const sockaddr* addr, socklen_t addr_len) const
|
||||
{
|
||||
return bind(m_socket, addr, addr_len);
|
||||
}
|
||||
|
||||
std::unique_ptr<Sock> Sock::Accept(sockaddr* addr, socklen_t* addr_len) const
|
||||
{
|
||||
#ifdef WIN32
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue