Network/UdpSocket: Add broadcasting option

Former-commit-id: bde428efc5e9c77cf3e64ec04d58d72613f1d8de
This commit is contained in:
Lynix
2015-11-12 13:35:46 +01:00
parent 81221fbf0b
commit f28e1a7d9b
5 changed files with 42 additions and 0 deletions

View File

@@ -26,10 +26,14 @@ namespace Nz
inline bool Create(NetProtocol protocol);
void EnableBroadcasting(bool broadcasting);
inline IpAddress GetBoundAddress() const;
inline UInt16 GetBoundPort() const;
inline SocketState GetState() const;
inline bool IsBroadcastingEnabled() const;
unsigned int QueryMaxDatagramSize();
bool Receive(void* buffer, std::size_t size, IpAddress* from, std::size_t* received);
@@ -42,6 +46,7 @@ namespace Nz
IpAddress m_boundAddress;
SocketState m_state;
bool m_isBroadCastingEnabled;
};
}

View File

@@ -61,6 +61,11 @@ namespace Nz
{
return m_state;
}
inline bool UdpSocket::IsBroadcastingEnabled() const
{
return m_isBroadCastingEnabled;
}
}
#include <Nazara/Network/DebugOff.hpp>