put back sendAssignmentRequest method removed in merge

This commit is contained in:
Stephen Birarda 2013-07-08 17:14:39 -07:00
parent 32b2c231e5
commit ddc684be49
2 changed files with 13 additions and 0 deletions

View file

@ -299,6 +299,16 @@ int NodeList::processDomainServerList(unsigned char *packetData, size_t dataByte
return readNodes;
}
void NodeList::sendAssignmentRequest() {
const char ASSIGNMENT_SERVER_HOSTNAME[] = "assignment.highfidelity.io";
const unsigned short ASSIGNMENT_SERVER_PORT = 7007;
static sockaddr_in assignmentServerSocket = socketForHostname(ASSIGNMENT_SERVER_HOSTNAME);
assignmentServerSocket.sin_port = htons(ASSIGNMENT_SERVER_PORT);
_nodeSocket.send((sockaddr*) &assignmentServerSocket, &PACKET_HEADER_REQUEST_ASSIGNMENT, 1);
}
Node* NodeList::addOrUpdateNode(sockaddr* publicSocket, sockaddr* localSocket, char nodeType, uint16_t nodeId) {
NodeList::iterator node = end();

View file

@ -71,9 +71,12 @@ public:
void unlock() { pthread_mutex_unlock(&mutex); }
void setNodeTypesOfInterest(const char* nodeTypesOfInterest, int numNodeTypesOfInterest);
void sendDomainServerCheckIn();
int processDomainServerList(unsigned char *packetData, size_t dataBytes);
void sendAssignmentRequest();
Node* nodeWithAddress(sockaddr *senderAddress);
Node* nodeWithID(uint16_t nodeID);