25{
26 struct soap soap;
27 soap_init(&soap);
28 soap_set_imode(&soap, SOAP_C_UTFSTRING);
29 soap_set_omode(&soap, SOAP_C_UTFSTRING);
30
31
32 soap.accept_timeout = 3;
33 soap.recv_timeout = 5;
34 soap.send_timeout = 5;
35
36 if (!soap_valid_socket(soap_bind(&soap, host.c_str(), port, 100)))
37 {
38 LOG_ERROR(
"network.soap",
"ACSoap: couldn't bind to {}:{}", host, port);
39 exit(-1);
40 }
41
42 LOG_INFO(
"network.soap",
"ACSoap: bound to http://{}:{}", host, port);
43
45 {
46 if (!soap_valid_socket(soap_accept(&soap)))
47 continue;
48
49 LOG_DEBUG(
"network.soap",
"ACSoap: accepted connection from IP={}.{}.{}.{}", (
int)(soap.ip >> 24) & 0xFF, (
int)(soap.ip >> 16) & 0xFF, (
int)(soap.ip >> 8) & 0xFF, (
int)soap.ip & 0xFF);
50 struct soap* thread_soap = soap_copy(&soap);
51
53 }
54
55 soap_destroy(&soap);
56 soap_end(&soap);
57 soap_done(&soap);
58}
#define LOG_INFO(filterType__,...)
Definition: Log.h:165
#define LOG_ERROR(filterType__,...)
Definition: Log.h:157
#define LOG_DEBUG(filterType__,...)
Definition: Log.h:169
void process_message(struct soap *soap_message)
Definition: ACSoap.cpp:60
static bool IsStopped()
Definition: World.h:254