#include "NetworkAPIProcessor.h"

int NetworkAPIProcessor::nextId = 0;
Framework::Critical NetworkAPIProcessor::idLock;

int NetworkAPIProcessor::generateId()
{
    idLock.lock();
    int result = nextId++;
    idLock.unlock();
    return result;
}

NetworkAPIProcessor::NetworkAPIProcessor()
    : id(generateId())
{}

int NetworkAPIProcessor::getId() const
{
    return id;
}
