diff options
author | m0gg | 2006-11-26 20:13:05 +0000 |
---|---|---|
committer | m0gg | 2006-11-26 20:13:05 +0000 |
commit | 65985c4e6527c82a75367d9c5418b009dfbc6379 (patch) | |
tree | 2050e9f4ccd9f460c3f3dbb27446baaa0fbbd9ae /libcsoap/soap-transport.c | |
parent | c8705844bd924e8e00bc79ec0f4ae92c85f7e48e (diff) | |
download | csoap-65985c4e6527c82a75367d9c5418b009dfbc6379.tar.gz csoap-65985c4e6527c82a75367d9c5418b009dfbc6379.tar.bz2 |
soap.udp transport added (alpha)
Diffstat (limited to 'libcsoap/soap-transport.c')
-rw-r--r-- | libcsoap/soap-transport.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/libcsoap/soap-transport.c b/libcsoap/soap-transport.c index 6b0444b..3cd46e8 100644 --- a/libcsoap/soap-transport.c +++ b/libcsoap/soap-transport.c @@ -1,5 +1,5 @@ /****************************************************************** -* $Id: soap-transport.c,v 1.4 2006/11/25 17:03:20 m0gg Exp $ +* $Id: soap-transport.c,v 1.5 2006/11/26 20:13:05 m0gg Exp $ * * CSOAP Project: A SOAP client/server library in C * Copyright (C) 2007 Heiko Ronsdorf @@ -33,6 +33,10 @@ #include <string.h> #endif +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + #include <libxml/tree.h> #include <libxml/uri.h> @@ -85,7 +89,7 @@ _soap_transport_new(const char *scheme, void *data, msg_exchange invoke) return ret; } -static void * +/* static void * _soap_transport_destroy(struct soap_transport *transport) { void *ret; @@ -98,8 +102,7 @@ _soap_transport_destroy(struct soap_transport *transport) free(transport); return ret; -} - +} */ herror_t soap_transport_process(struct SoapCtx *request, struct SoapCtx **response) @@ -181,15 +184,16 @@ soap_transport_server_run(void) { herror_t status; - if ((status = soap_nhttp_server_run()) != H_OK) + if ((status = soap_nudp_server_run_threaded()) != H_OK) { - log_error2("soap_nhttp_server_run failed (%s)", herror_message(status)); + log_error2("soap_nudp_server_run failed (%s)", herror_message(status)); return status; } - if ((status = soap_nudp_server_run()) != H_OK) + /* nanoHTTP blocks in this call */ + if ((status = soap_nhttp_server_run()) != H_OK) { - log_error2("soap_nudp_server_run failed (%s)", herror_message(status)); + log_error2("soap_nhttp_server_run failed (%s)", herror_message(status)); return status; } |