1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Add UDP broadcast socket.

This commit is contained in:
Bartosz Taudul
2019-06-17 02:24:55 +02:00
parent 5db6cc4eee
commit 40e517594b
2 changed files with 98 additions and 0 deletions
+20
View File
@@ -63,6 +63,26 @@ private:
int m_sock;
};
class UdpBroadcast
{
public:
UdpBroadcast();
~UdpBroadcast();
bool Open( const char* addr, const char* port );
void Close();
int Send( const void* data, int len );
UdpBroadcast( const UdpBroadcast& ) = delete;
UdpBroadcast( UdpBroadcast&& ) = delete;
UdpBroadcast& operator=( const UdpBroadcast& ) = delete;
UdpBroadcast& operator=( UdpBroadcast&& ) = delete;
private:
int m_sock;
};
}
#endif