Added ChatServer and soePlatform

This commit is contained in:
Anonymous
2014-01-17 03:40:51 -07:00
parent 26b88b4533
commit 4fae2dfe0f
183 changed files with 64549 additions and 0 deletions
@@ -0,0 +1,42 @@
// Copyright 2004 Sony Online Entertainment, all rights reserved.
// Author: Jeff Petersen
#include <assert.h>
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "UdpLibrary.h"
namespace UdpLibrary
{
////////////////////////////////////////////////////////
// UdpGuardedRefCount
////////////////////////////////////////////////////////
void UdpGuardedRefCount::AddRef() const
{
UdpGuard guard(&mGuard);
UdpRefCount::AddRef();
}
void UdpGuardedRefCount::Release() const
{
mGuard.Enter();
assert(!mNoRef);
assert(mRefCount > 0);
bool done = (--mRefCount == 0);
mGuard.Leave();
if (done)
{
delete this;
}
}
} // namespace