Update
Integrated std::byte added to C++17 recently
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "VoidNet/Socket.hpp"
|
||||
#include "VoidNet_LL/Socket.hpp"
|
||||
|
||||
#include <memory>
|
||||
|
||||
@ -13,17 +13,17 @@ namespace std::net
|
||||
UdpSocket(SocketProtocol protocol = SocketProtocol::IPv4);
|
||||
|
||||
bool Bind(const IPAddress &addr);
|
||||
bool SendTo(const uint8_t* data, int32_t count, int32_t& sent, const IPAddress& addrDest);
|
||||
bool RecvFrom(uint8_t* data, int32_t size, int32_t& read, IPAddress& srcAddr, SocketReceiveFlags flags = SocketReceiveFlags::None);
|
||||
bool SendTo(const byte* data, int32_t count, int32_t& sent, const IPAddress& addrDest);
|
||||
bool RecvFrom(byte* data, int32_t size, int32_t& read, IPAddress& srcAddr, SocketReceiveFlags flags = SocketReceiveFlags::None);
|
||||
bool GetPeerAddress(IPAddress& outAddr);
|
||||
bool JoinMulticastGroup(const IPAddress& addrStr);
|
||||
bool LeaveMulticastGroup(const IPAddress& addrStr);
|
||||
bool SetMulticastLoopback(bool loopback);
|
||||
bool SetMulticastTtl(uint8_t timeToLive);
|
||||
bool SetMulticastTtl(byte timeToLive);
|
||||
uint32_t GetPort();
|
||||
bool SetReuseAddr(bool allowReuse = true);
|
||||
|
||||
private:
|
||||
std::unique_ptr<Socket> m_socket;
|
||||
unique_ptr<Socket> m_socket;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user