Controller now listens locally to UDP port 4242 for API commands, added always-minimal api2 request type.
This commit is contained in:
		
							parent
							
								
									3980b8c8c1
								
							
						
					
					
						commit
						d0912c9d00
					
				
					 3 changed files with 526 additions and 489 deletions
				
			
		| 
						 | 
					@ -362,6 +362,8 @@ int main_loop(int argc, char ** argv){
 | 
				
			||||||
  tthread::thread uplinkThread(Controller::uplinkConnection, 0);/*LTS*/
 | 
					  tthread::thread uplinkThread(Controller::uplinkConnection, 0);/*LTS*/
 | 
				
			||||||
  //start push checking thread
 | 
					  //start push checking thread
 | 
				
			||||||
  tthread::thread pushThread(Controller::pushCheckLoop, 0);
 | 
					  tthread::thread pushThread(Controller::pushCheckLoop, 0);
 | 
				
			||||||
 | 
					  //start UDP API thread
 | 
				
			||||||
 | 
					  tthread::thread UDPAPIThread(Controller::handleUDPAPI, 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  //start main loop
 | 
					  //start main loop
 | 
				
			||||||
| 
						 | 
					@ -410,6 +412,8 @@ int main_loop(int argc, char ** argv){
 | 
				
			||||||
  uplinkThread.join();
 | 
					  uplinkThread.join();
 | 
				
			||||||
  HIGH_MSG("Joining push thread...");
 | 
					  HIGH_MSG("Joining push thread...");
 | 
				
			||||||
  pushThread.join();
 | 
					  pushThread.join();
 | 
				
			||||||
 | 
					  HIGH_MSG("Joining UDP API thread...");
 | 
				
			||||||
 | 
					  UDPAPIThread.join();
 | 
				
			||||||
  #ifdef LICENSING
 | 
					  #ifdef LICENSING
 | 
				
			||||||
  HIGH_MSG("Joining license thread...");
 | 
					  HIGH_MSG("Joining license thread...");
 | 
				
			||||||
  licenseThread.join();
 | 
					  licenseThread.join();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							| 
						 | 
					@ -5,4 +5,6 @@ namespace Controller {
 | 
				
			||||||
  void checkConfig(JSON::Value & in, JSON::Value & out);
 | 
					  void checkConfig(JSON::Value & in, JSON::Value & out);
 | 
				
			||||||
  bool authorize(JSON::Value & Request, JSON::Value & Response, Socket::Connection & conn);
 | 
					  bool authorize(JSON::Value & Request, JSON::Value & Response, Socket::Connection & conn);
 | 
				
			||||||
  int handleAPIConnection(Socket::Connection & conn);
 | 
					  int handleAPIConnection(Socket::Connection & conn);
 | 
				
			||||||
 | 
					  void handleAPICommands(JSON::Value & Request, JSON::Value & Response);
 | 
				
			||||||
 | 
					  void handleUDPAPI(void * np);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue