Integrated std::byte added to C++17 recently
This commit is contained in:
TheDoctor
2019-10-15 21:03:24 +01:00
parent 8fbda17074
commit 5ab59a6fb8
49 changed files with 424 additions and 427 deletions

View File

@ -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;
};
}