Provide getter for broadcast BIP socket (#350)

This commit is contained in:
Alexander Wells
2022-10-24 19:44:42 +01:00
committed by GitHub
parent de454a8d5c
commit 5b30674215
5 changed files with 42 additions and 1 deletions
+13
View File
@@ -89,12 +89,25 @@ static void debug_print_ipv4(const char *str,
* @return The active BIP socket, or INVALID_SOCKET if uninitialized.
* @note Strictly, the return type should be SOCKET, however in practice
* Windows never returns values large enough that truncation is an issue.
* @see bip_get_broadcast_socket
*/
int bip_get_socket(void)
{
return (int)BIP_Socket;
}
/**
* @brief Return the active BIP Broadcast socket.
* @return The active BIP Broadcast socket, or INVALID_SOCKET if uninitialized.
* @note Strictly, the return type should be SOCKET, however in practice
* Windows never returns values large enough that truncation is an issue.
* @see bip_get_socket
*/
int bip_get_broadcast_socket(void)
{
return (int)BIP_Broadcast_Socket;
}
/**
* @brief Enabled debug printing of BACnet/IPv4
*/