/[jscoverage]/trunk/http-server.h
ViewVC logotype

Diff of /trunk/http-server.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 116 by siliconforks, Sat May 31 21:42:36 2008 UTC revision 505 by siliconforks, Sat Jan 2 04:55:54 2010 UTC
# Line 1  Line 1 
1  /*  /*
2      http-server.h - generic HTTP server      http-server.h - generic HTTP server
3      Copyright (C) 2008 siliconforks.com      Copyright (C) 2008, 2009, 2010 siliconforks.com
4    
5      This program is free software; you can redistribute it and/or modify      This program is free software; you can redistribute it and/or modify
6      it under the terms of the GNU General Public License as published by      it under the terms of the GNU General Public License as published by
# Line 24  Line 24 
24  #include <stdint.h>  #include <stdint.h>
25  #include <stdlib.h>  #include <stdlib.h>
26    
27  #ifdef _WIN32  #ifdef __MINGW32__
28  #include <winsock2.h>  #include <winsock2.h>
29    typedef int socklen_t;
30  #else  #else
31    #include <arpa/inet.h>
32    #include <netdb.h>
33  #include <netinet/in.h>  #include <netinet/in.h>
34    #include <sys/socket.h>
35    #include <unistd.h>
36  typedef int SOCKET;  typedef int SOCKET;
37    #define INVALID_SOCKET (-1)
38    #define closesocket close
39  #endif  #endif
40    
41  #include "stream.h"  #include "stream.h"
# Line 115  Line 122 
122  const char * HTTPMessage_find_header(const HTTPMessage * message, const char * name);  const char * HTTPMessage_find_header(const HTTPMessage * message, const char * name);
123  void HTTPMessage_add_header(HTTPMessage * message, const char * name, const char * value);  void HTTPMessage_add_header(HTTPMessage * message, const char * name, const char * value);
124  void HTTPMessage_set_header(HTTPMessage * message, const char * name, const char * value);  void HTTPMessage_set_header(HTTPMessage * message, const char * name, const char * value);
125    char * HTTPMessage_get_charset(const HTTPMessage * message);
126  void HTTPMessage_set_content_length(HTTPMessage * message, size_t value);  void HTTPMessage_set_content_length(HTTPMessage * message, size_t value);
127  int HTTPMessage_read_start_line_and_headers(HTTPMessage * message) __attribute__((warn_unused_result));  int HTTPMessage_read_start_line_and_headers(HTTPMessage * message) __attribute__((warn_unused_result));
128  int HTTPMessage_write_start_line_and_headers(HTTPMessage * message) __attribute__((warn_unused_result));  int HTTPMessage_write_start_line_and_headers(HTTPMessage * message) __attribute__((warn_unused_result));
# Line 148  Line 156 
156  const char * HTTPExchange_get_host(const HTTPExchange * exchange);  const char * HTTPExchange_get_host(const HTTPExchange * exchange);
157  uint16_t HTTPExchange_get_port(const HTTPExchange * exchange);  uint16_t HTTPExchange_get_port(const HTTPExchange * exchange);
158  const char * HTTPExchange_get_abs_path(const HTTPExchange * exchange);  const char * HTTPExchange_get_abs_path(const HTTPExchange * exchange);
159    const char * HTTPExchange_get_query(const HTTPExchange * exchange);
160  void HTTPExchange_set_method(HTTPExchange * exchange, const char * method);  void HTTPExchange_set_method(HTTPExchange * exchange, const char * method);
161  void HTTPExchange_set_request_uri(HTTPExchange * exchange, const char * request_uri);  void HTTPExchange_set_request_uri(HTTPExchange * exchange, const char * request_uri);
162    
# Line 193  Line 202 
202    
203  int xgethostbyname(const char * host, struct in_addr * result) __attribute__((warn_unused_result));  int xgethostbyname(const char * host, struct in_addr * result) __attribute__((warn_unused_result));
204    
205    #ifndef HAVE_INET_ATON
206    int inet_aton(const char * name, struct in_addr * a);
207    #endif
208    
209  #endif /* HTTP_SERVER_H_ */  #endif /* HTTP_SERVER_H_ */

Legend:
Removed from v.116  
changed lines
  Added in v.505

  ViewVC Help
Powered by ViewVC 1.1.24