mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-08-01 02:15:54 -04:00
Added serverNetworkMessages library
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
// TaskConnectionIdMessage.cpp
|
||||
// Copyright 2000-01, Sony Online Entertainment Inc., all rights reserved.
|
||||
// Author: Justin Randall
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
#include "serverNetworkMessages/FirstServerNetworkMessages.h"
|
||||
#include "TaskConnectionIdMessage.h"
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskConnectionIdMessage::TaskConnectionIdMessage(enum Id id, const std::string & pCommandLine, const std::string & pClusterName) :
|
||||
GameNetworkMessage("TaskConnectionIdMessage"),
|
||||
serverType(static_cast<unsigned char>(id)),
|
||||
commandLine(pCommandLine),
|
||||
clusterName(pClusterName),
|
||||
currentEpochTime(static_cast<long>(::time(NULL)))
|
||||
{
|
||||
addVariable(serverType);
|
||||
addVariable(commandLine);
|
||||
addVariable(clusterName);
|
||||
addVariable(currentEpochTime);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskConnectionIdMessage::TaskConnectionIdMessage(Archive::ReadIterator & source) :
|
||||
GameNetworkMessage("TaskConnectionIdMessage"),
|
||||
serverType(0),
|
||||
commandLine(),
|
||||
clusterName(),
|
||||
currentEpochTime(0)
|
||||
{
|
||||
addVariable(serverType);
|
||||
addVariable(commandLine);
|
||||
addVariable(clusterName);
|
||||
addVariable(currentEpochTime);
|
||||
unpack(source);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskConnectionIdMessage::~TaskConnectionIdMessage()
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
TaskConnectionIdMessage & TaskConnectionIdMessage::operator = (const TaskConnectionIdMessage & rhs)
|
||||
{
|
||||
if(this != &rhs)
|
||||
{
|
||||
// make assignments if right hand side is not this instance
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
Reference in New Issue
Block a user