handmade/include/UDPbase.h
Bubblegumdrop 764ebe4ce2 Another Buffer_To_UDPPacketV. Yet to test.
Split UDPbase out.

Change ShaderProgram to std::unique_ptr<ShaderProgram>.

I think I may change Buffer_To_UDPPacketV  to some kind of RAII style code.
2022-01-08 21:23:42 -05:00

21 lines
428 B
C++

#pragma once
#include <string>
#include <SDL_net.h>
#define DEFAULT_MAX_PACKET_SIZE 250
class UDPbase
{
IPaddress addr;
public:
UDPbase (const char* host, const Uint16 port);
~UDPbase (void);
UDPsocket Open (void);
UDPsocket Open (const Uint16 port);
void Close (UDPsocket sock);
int Bind (UDPsocket sock, const int channel);
void Unbind (UDPsocket sock, const int channel);
std::string toString (void);
};