#include <socket_windows.h>
Definition at line 46 of file socket_windows.h.
◆ SocketType
Type representing the native socket handle type.
Definition at line 54 of file socket_windows.h.
◆ SocketWindows() [1/2]
rcdiscover::SocketWindows::SocketWindows |
( |
int |
domain, |
|
|
int |
type, |
|
|
int |
protocol, |
|
|
ULONG |
dst_ip, |
|
|
uint16_t |
port, |
|
|
std::string |
iface_name |
|
) |
| |
Constructor.
- Parameters
-
domain | domain of socket() |
type | type of socket() |
protocol | protocol of socket() |
dst_ip | destination IP address |
port | destination port |
Definition at line 201 of file socket_windows.cc.
◆ SocketWindows() [2/2]
rcdiscover::SocketWindows::SocketWindows |
( |
SocketWindows && |
other | ) |
|
◆ ~SocketWindows()
rcdiscover::SocketWindows::~SocketWindows |
( |
| ) |
|
◆ bindImpl()
void rcdiscover::SocketWindows::bindImpl |
( |
const sockaddr_in & |
addr | ) |
|
|
protected |
Binds the socket to a specific sockaddr.
- Parameters
-
addr | sockaddr_in to which to bind the socket |
Definition at line 249 of file socket_windows.cc.
◆ create()
SocketWindows rcdiscover::SocketWindows::create |
( |
ULONG |
dst_ip, |
|
|
uint16_t |
port, |
|
|
std::string |
iface_name |
|
) |
| |
|
static |
Create a new socket.
- Parameters
-
dst_ip | destination IP address |
port | destination port |
- Returns
- the created socket
Definition at line 53 of file socket_windows.cc.
◆ createAndBindForAllInterfaces()
std::vector< SocketWindows > rcdiscover::SocketWindows::createAndBindForAllInterfaces |
( |
uint16_t |
port | ) |
|
|
static |
Creates sockets for all interfaces and binds them to the respective interface.
- Parameters
-
- Returns
- vector of sockets
Definition at line 88 of file socket_windows.cc.
◆ enableBroadcastImpl()
void rcdiscover::SocketWindows::enableBroadcastImpl |
( |
| ) |
|
|
protected |
◆ enableNonBlockingImpl()
void rcdiscover::SocketWindows::enableNonBlockingImpl |
( |
| ) |
|
|
protected |
◆ getBroadcastAddr()
const ULONG & rcdiscover::SocketWindows::getBroadcastAddr |
( |
| ) |
|
|
static |
Returns the broadcast address.
- Returns
- broadcast address
Definition at line 47 of file socket_windows.cc.
◆ getHandleImpl()
const SOCKET & rcdiscover::SocketWindows::getHandleImpl |
( |
| ) |
const |
|
protected |
Returns the native socket handle.
- Returns
- native socket handle.
Definition at line 244 of file socket_windows.cc.
◆ operator=()
◆ sendImpl()
void rcdiscover::SocketWindows::sendImpl |
( |
const std::vector< uint8_t > & |
sendbuf | ) |
|
|
protected |
◆ Socket< SocketWindows >
◆ dst_addr_
sockaddr_in rcdiscover::SocketWindows::dst_addr_ |
|
private |
◆ sock_
SOCKET rcdiscover::SocketWindows::sock_ |
|
private |
The documentation for this class was generated from the following files: