Updated TODO list

Removed windows specific files since the code is the same for linux
UdpClient: added basic methods to interact with the variables of that class, added initialization and started with sending and receiving messages
UdpServer: added initialization and basic variables
Utility: added a bunch of methods to the StringConverter utility class
VoidNetClientAPI: SendMessage now checks if message is not an handshake
This commit is contained in:
xX-TheDoctor-Xx
2016-09-08 00:36:45 +01:00
parent 74d9d5db87
commit 3e97c0da6d
20 changed files with 593 additions and 318 deletions

34
include/UdpServer.hpp Normal file
View File

@ -0,0 +1,34 @@
#ifndef UDP_SERVER_HPP
#define UDP_SERVER_HPP
#ifdef _MSC_VER
#pragma once
#endif
#include "Defs.hpp"
#include "UdpClient.hpp"
#include <string>
#include <vector>
struct UdpServer
{
private:
bool initialize(uint16 port = default_server_port);
uint16 allocate_id();
void shutdown_internal();
bool initialized = false;
bool running = false;
uint16 max_connections = 0;
std::vector<UdpClient> clients;
SOCKET server_udp_socket = INVALID_SOCKET;
struct sockaddr_in server;
};
#endif