|
@@ -13,24 +13,26 @@
|
|
|
|
|
|
#ifdef ENABLE_NETWORK
|
|
|
|
|
|
#include "../../stdafx.h"
|
|
|
|
|
|
#include "../network.h"
|
|
|
#include "../network_internal.h"
|
|
|
#include "../../debug.h"
|
|
|
#include "../../error.h"
|
|
|
|
|
|
#include "table/strings.h"
|
|
|
|
|
|
#include "../../safeguards.h"
|
|
|
|
|
|
/**
|
|
|
* Create a new socket for the game connection.
|
|
|
* @param s The socket to connect with.
|
|
|
*/
|
|
|
NetworkGameSocketHandler::NetworkGameSocketHandler(SOCKET s) : info(NULL), client_id(INVALID_CLIENT_ID),
|
|
|
last_frame(_frame_counter), last_frame_server(_frame_counter), last_packet(_realtime_tick)
|
|
|
{
|
|
|
this->sock = s;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* Functions to help ReceivePacket/SendPacket a bit
|