Пример #1
0
int main(int argc, char *argv[]) {
    Server mme_server;

    check_server_usage(argc, argv);
    mme_server.begin_thread_pool(atoi(argv[1]), process_req);
    mme_server.fill_server_details(g_mme_port, g_mme_addr);
    mme_server.bind_server();
    mme_server.listen_accept();
    return 0;
}
Пример #2
0
int main(int argc, char *argv[]) {
	Server hss_server;
	
	check_server_usage(argc, argv);
	if(mysql_library_init(0, NULL, NULL))
		cout << "ERROR: mysql library cannot be opened" << endl;
	hss_server.begin_thread_pool(atoi(argv[1]), process_req);
	hss_server.fill_server_details(g_hss_port, g_hss_addr);
	hss_server.bind_server();
	hss_server.listen_accept();
	mysql_library_end();
	return 0;
}
Пример #3
0
int main(int argc, char *argv[]) {
	int status;
	int i;

	check_server_usage(argc, argv);
	if(mysql_library_init(0, NULL, NULL))
		cout << "ERROR: mysql library cannot be opened" << endl;	
	startup_hss(argv);
	setup_conn_details();
	for (i = 0; i < g_tcount; i++) {
		status = pthread_create(&g_tid[i], NULL, process_reqs, NULL);
		report_error(status);
	}
	for (i = 0; i < g_tcount; i++) {
		pthread_join(g_tid[i], NULL);
	}	
	mysql_library_end();	
	return 0;
}
Пример #4
0
int main(int argc, char *argv[]) {
	int status;
	int i;

	check_server_usage(argc, argv);
	startup_pgw(argv);
	setup_pgw_data();
	generate_ip_table();

	status = pthread_create(&g_downlink_tid, NULL, process_downlink_traffic, NULL);
	report_error(status);	

	for (i = 0; i < g_tcount; i++) {
		status = pthread_create(&g_tid[i], NULL, process_traffic, NULL);
		report_error(status);
	}
	for (i = 0; i < g_tcount; i++) {
		pthread_join(g_tid[i], NULL);
	}		

	free_pgw_data();
	return 0;
}