mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 06:23:06 +02:00
Switching to unsigned
This commit is contained in:
parent
9e0df2dbd1
commit
e396269d78
3 changed files with 8 additions and 8 deletions
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
Agent::Agent() {}
|
Agent::Agent() {}
|
||||||
|
|
||||||
Agent::Agent(sockaddr *agentPublicSocket, sockaddr *agentLocalSocket, char agentType, int16_t thisAgentId) {
|
Agent::Agent(sockaddr *agentPublicSocket, sockaddr *agentLocalSocket, char agentType, uint16_t thisAgentId) {
|
||||||
publicSocket = new sockaddr;
|
publicSocket = new sockaddr;
|
||||||
memcpy(publicSocket, agentPublicSocket, sizeof(sockaddr));
|
memcpy(publicSocket, agentPublicSocket, sizeof(sockaddr));
|
||||||
|
|
||||||
|
@ -76,11 +76,11 @@ void Agent::setType(char newType) {
|
||||||
type = newType;
|
type = newType;
|
||||||
}
|
}
|
||||||
|
|
||||||
int16_t Agent::getAgentId() {
|
uint16_t Agent::getAgentId() {
|
||||||
return agentId;
|
return agentId;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Agent::setAgentId(int16_t thisAgentId) {
|
void Agent::setAgentId(uint16_t thisAgentId) {
|
||||||
agentId = thisAgentId;
|
agentId = thisAgentId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
class Agent {
|
class Agent {
|
||||||
public:
|
public:
|
||||||
Agent();
|
Agent();
|
||||||
Agent(sockaddr *agentPublicSocket, sockaddr *agentLocalSocket, char agentType, int16_t thisAgentId);
|
Agent(sockaddr *agentPublicSocket, sockaddr *agentLocalSocket, char agentType, uint16_t thisAgentId);
|
||||||
Agent(const Agent &otherAgent);
|
Agent(const Agent &otherAgent);
|
||||||
~Agent();
|
~Agent();
|
||||||
Agent& operator=(Agent otherAgent);
|
Agent& operator=(Agent otherAgent);
|
||||||
|
@ -25,8 +25,8 @@ class Agent {
|
||||||
bool matches(sockaddr *otherPublicSocket, sockaddr *otherLocalSocket, char otherAgentType);
|
bool matches(sockaddr *otherPublicSocket, sockaddr *otherLocalSocket, char otherAgentType);
|
||||||
char getType();
|
char getType();
|
||||||
void setType(char newType);
|
void setType(char newType);
|
||||||
int16_t getAgentId();
|
uint16_t getAgentId();
|
||||||
void setAgentId(int16_t thisAgentId);
|
void setAgentId(uint16_t thisAgentId);
|
||||||
double getFirstRecvTimeUsecs();
|
double getFirstRecvTimeUsecs();
|
||||||
void setFirstRecvTimeUsecs(double newTimeUsecs);
|
void setFirstRecvTimeUsecs(double newTimeUsecs);
|
||||||
double getLastRecvTimeUsecs();
|
double getLastRecvTimeUsecs();
|
||||||
|
@ -46,7 +46,7 @@ class Agent {
|
||||||
void swap(Agent &first, Agent &second);
|
void swap(Agent &first, Agent &second);
|
||||||
sockaddr *publicSocket, *localSocket, *activeSocket;
|
sockaddr *publicSocket, *localSocket, *activeSocket;
|
||||||
char type;
|
char type;
|
||||||
int16_t agentId;
|
uint16_t agentId;
|
||||||
double firstRecvTimeUsecs;
|
double firstRecvTimeUsecs;
|
||||||
double lastRecvTimeUsecs;
|
double lastRecvTimeUsecs;
|
||||||
AgentData *linkedData;
|
AgentData *linkedData;
|
||||||
|
|
|
@ -45,7 +45,7 @@ class AgentList {
|
||||||
UDPSocket agentSocket;
|
UDPSocket agentSocket;
|
||||||
std::vector<Agent> agents;
|
std::vector<Agent> agents;
|
||||||
pthread_t removeSilentAgentsThread;
|
pthread_t removeSilentAgentsThread;
|
||||||
int16_t lastAgentId;
|
uint16_t lastAgentId;
|
||||||
int indexOfMatchingAgent(sockaddr *senderAddress);
|
int indexOfMatchingAgent(sockaddr *senderAddress);
|
||||||
void handlePingReply(sockaddr *agentAddress);
|
void handlePingReply(sockaddr *agentAddress);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue