mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-08 21:36:52 +02:00
add _ownerID member variable to AgentList
This commit is contained in:
parent
589e524090
commit
43a3775633
2 changed files with 9 additions and 7 deletions
|
@ -62,8 +62,9 @@ AgentList::AgentList(char newOwnerType, unsigned int newSocketListenPort) :
|
||||||
_agentBuckets(),
|
_agentBuckets(),
|
||||||
_numAgents(0),
|
_numAgents(0),
|
||||||
agentSocket(newSocketListenPort),
|
agentSocket(newSocketListenPort),
|
||||||
ownerType(newOwnerType),
|
_ownerType(newOwnerType),
|
||||||
socketListenPort(newSocketListenPort),
|
socketListenPort(newSocketListenPort),
|
||||||
|
_ownerID(-1),
|
||||||
lastAgentId(0) {
|
lastAgentId(0) {
|
||||||
pthread_mutex_init(&mutex, 0);
|
pthread_mutex_init(&mutex, 0);
|
||||||
}
|
}
|
||||||
|
@ -81,10 +82,6 @@ UDPSocket& AgentList::getAgentSocket() {
|
||||||
return agentSocket;
|
return agentSocket;
|
||||||
}
|
}
|
||||||
|
|
||||||
char AgentList::getOwnerType() {
|
|
||||||
return ownerType;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int AgentList::getSocketListenPort() {
|
unsigned int AgentList::getSocketListenPort() {
|
||||||
return socketListenPort;
|
return socketListenPort;
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,9 +70,13 @@ public:
|
||||||
int updateAgentWithData(Agent *agent, unsigned char *packetData, int dataBytes);
|
int updateAgentWithData(Agent *agent, unsigned char *packetData, int dataBytes);
|
||||||
|
|
||||||
void broadcastToAgents(unsigned char *broadcastData, size_t dataBytes, const char* agentTypes, int numAgentTypes);
|
void broadcastToAgents(unsigned char *broadcastData, size_t dataBytes, const char* agentTypes, int numAgentTypes);
|
||||||
char getOwnerType();
|
|
||||||
unsigned int getSocketListenPort();
|
unsigned int getSocketListenPort();
|
||||||
|
|
||||||
|
char getOwnerType() const { return _ownerType; }
|
||||||
|
|
||||||
|
uint16_t getOwnerID() const { return _ownerID; }
|
||||||
|
void setOwnerID(uint16_t ownerID) { _ownerID = ownerID; }
|
||||||
|
|
||||||
Agent* soloAgentOfType(char agentType);
|
Agent* soloAgentOfType(char agentType);
|
||||||
|
|
||||||
void startSilentAgentRemovalThread();
|
void startSilentAgentRemovalThread();
|
||||||
|
@ -96,8 +100,9 @@ private:
|
||||||
Agent** _agentBuckets[MAX_NUM_AGENTS / AGENTS_PER_BUCKET];
|
Agent** _agentBuckets[MAX_NUM_AGENTS / AGENTS_PER_BUCKET];
|
||||||
int _numAgents;
|
int _numAgents;
|
||||||
UDPSocket agentSocket;
|
UDPSocket agentSocket;
|
||||||
char ownerType;
|
char _ownerType;
|
||||||
unsigned int socketListenPort;
|
unsigned int socketListenPort;
|
||||||
|
uint16_t _ownerID;
|
||||||
uint16_t lastAgentId;
|
uint16_t lastAgentId;
|
||||||
pthread_t removeSilentAgentsThread;
|
pthread_t removeSilentAgentsThread;
|
||||||
pthread_t checkInWithDomainServerThread;
|
pthread_t checkInWithDomainServerThread;
|
||||||
|
|
Loading…
Reference in a new issue