#include <vector>
#include <list>
#include <functional>
+#include <cstdint>
-#include "stg/os_int.h"
#include "stg/blowfish.h"
#include "stg/rs_packets.h"
#include "stg/logger.h"
class IsNotTimedOut : public std::unary_function<const AliveData &, bool> {
public:
- IsNotTimedOut(double to) : timeout(to), now(time(NULL)) {}
+ explicit IsNotTimedOut(double to) : timeout(to), now(time(NULL)) {}
bool operator()(const AliveData & data) const
{
return difftime(now, data.lastAlive) < timeout;
bool FinalizeNet();
bool RecvPacket();
// Parsing stuff
- bool CheckHeader(const RS_PACKET_HEADER & header) const;
+ bool CheckHeader(const RS::PACKET_HEADER & header) const;
bool GetParams(char * buffer, UserData & data);
// Processing stuff
void ProcessPending();
bool Connect(const UserData & data) const;
BLOWFISH_CTX ctxS;
- STG_LOGGER & WriteServLog;
+ STG::Logger& WriteServLog;
mutable std::string errorStr;
std::string scriptOnConnect;
class DisconnectUser : public std::unary_function<const UserData &, void> {
public:
- DisconnectUser(LISTENER & l) : listener(l) {};
+ explicit DisconnectUser(LISTENER & l) : listener(l) {};
void operator()(const UserData & data)
{
listener.Disconnect(data);