From 9b300defa7ce03d8e2b78d6c0352f0245fcc7765 Mon Sep 17 00:00:00 2001 From: snowdrop Date: Fri, 15 Oct 2004 15:10:14 +0000 Subject: updated for compiling under *nix --- nanohttp/Makefile.am | 12 +++++++++--- nanohttp/nanohttp-client.c | 3 ++- nanohttp/nanohttp-client.h | 3 ++- nanohttp/nanohttp-socket.c | 12 ++++++++++-- 4 files changed, 23 insertions(+), 7 deletions(-) (limited to 'nanohttp') diff --git a/nanohttp/Makefile.am b/nanohttp/Makefile.am index ba3cf78..c59e0f8 100644 --- a/nanohttp/Makefile.am +++ b/nanohttp/Makefile.am @@ -5,14 +5,20 @@ h_sources = nanohttp-common.h\ nanohttp-socket.h\ nanohttp-client.h\ nanohttp-server.h\ -nanohttp-reqres.h\ -nanohttp-stream.h +nanohttp-stream.h\ +nanohttp-mime.h\ +nanohttp-request.h\ +nanohttp-response.h cc_sources = nanohttp-common.c\ nanohttp-socket.c\ nanohttp-client.c\ nanohttp-server.c\ -nanohttp-stream.c +nanohttp-stream.c\ +nanohttp-mime.c\ +nanohttp-request.c\ +nanohttp-response.c + library_includedir=$(includedir)/$(NANOHTTP_LIBRARY_NAME)-$(NANOHTTP_API_VERSION)/$(NANOHTTP_LIBRARY_NAME) library_include_HEADERS = $(h_sources) diff --git a/nanohttp/nanohttp-client.c b/nanohttp/nanohttp-client.c index 3c3ce7f..9c0c7d0 100644 --- a/nanohttp/nanohttp-client.c +++ b/nanohttp/nanohttp-client.c @@ -1,5 +1,5 @@ /****************************************************************** -* $Id: nanohttp-client.c,v 1.20 2004/10/15 13:29:36 snowdrop Exp $ +* $Id: nanohttp-client.c,v 1.21 2004/10/15 15:10:37 snowdrop Exp $ * * CSOAP Project: A http client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -31,6 +31,7 @@ #include #include #include +#include #ifdef MEM_DEBUG #include diff --git a/nanohttp/nanohttp-client.h b/nanohttp/nanohttp-client.h index 8bd8579..ec4a837 100644 --- a/nanohttp/nanohttp-client.h +++ b/nanohttp/nanohttp-client.h @@ -1,5 +1,5 @@ /****************************************************************** - * $Id: nanohttp-client.h,v 1.9 2004/10/15 13:29:36 snowdrop Exp $ + * $Id: nanohttp-client.h,v 1.10 2004/10/15 15:10:37 snowdrop Exp $ * * CSOAP Project: A http client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -28,6 +28,7 @@ #include #include #include +#include typedef struct httpc_conn { diff --git a/nanohttp/nanohttp-socket.c b/nanohttp/nanohttp-socket.c index 82d7280..e437df7 100644 --- a/nanohttp/nanohttp-socket.c +++ b/nanohttp/nanohttp-socket.c @@ -1,5 +1,5 @@ /****************************************************************** -* $Id: nanohttp-socket.c,v 1.23 2004/10/15 13:29:37 snowdrop Exp $ +* $Id: nanohttp-socket.c,v 1.24 2004/10/15 15:10:37 snowdrop Exp $ * * CSOAP Project: A http client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -266,7 +266,15 @@ hsocket_close (hsocket_t sock) closesocket (sock); */ #else - close (sock); + /* + struct linger _linger; + hsocket_block(sock,1); + _linger.l_onoff =1; + _linger.l_linger = 30000; + setsockopt(sock, SOL_SOCKET, SO_LINGER, (const char*)&_linger, sizeof(struct linger)); + + + close (sock);*/ #endif } -- cgit v1.1-32-gdbae