1er commit

This commit is contained in:
2021-08-21 10:14:47 +02:00
commit a99ecf7c2d
99 changed files with 66605 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
#ifndef NETWORK_UDP_SOCKET_H_
#define NETWORK_UDP_SOCKET_H_
#include "network/IPAddress.h"
#include "network/Socket.h"
#include <cstdint>
namespace td {
namespace network {
class UDPSocket : public Socket {
private:
IPAddress m_RemoteIP;
uint16_t m_Port;
sockaddr_in m_RemoteAddr;
public:
UDPSocket();
bool Connect(const IPAddress& address, std::uint16_t port);
std::size_t Send(const std::uint8_t* data, std::size_t size);
DataBuffer Receive(std::size_t amount);
};
} // ns network
} // ns td
#endif