27{
28 struct soap soap;
29 soap_init(&soap);
30 soap_set_imode(&soap, SOAP_C_UTFSTRING);
31 soap_set_omode(&soap, SOAP_C_UTFSTRING);
32
33
34 soap.accept_timeout = 3;
35 soap.recv_timeout = 5;
36 soap.send_timeout = 5;
37
38
39 soap.bind_flags = SO_REUSEADDR;
40
41 if (!soap_valid_socket(soap_bind(&soap, host.c_str(), port, 100)))
42 {
43 LOG_ERROR(
"network.soap",
"ACSoap: couldn't bind to {}:{}", host, port);
44
46 return;
47 }
48
49 LOG_INFO(
"network.soap",
"ACSoap: bound to http://{}:{}", host, port);
50
52 {
53 if (!soap_valid_socket(soap_accept(&soap)))
54 continue;
55
56 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);
57 struct soap* thread_soap = soap_copy(&soap);
58
60 }
61
62 soap_destroy(&soap);
63 soap_end(&soap);
64 soap_done(&soap);
65}
void process_message(struct soap *soap_message)
Definition ACSoap.cpp:67
#define LOG_INFO(filterType__,...)
Definition Log.h:153
#define LOG_ERROR(filterType__,...)
Definition Log.h:145
#define LOG_DEBUG(filterType__,...)
Definition Log.h:157
static void StopNow(uint8 exitcode)
Definition World.h:188
static bool IsStopped()
Definition World.h:189
@ ERROR_EXIT_CODE
Definition World.h:54