CONTENT
  • CHANGES
Szukaj
counter

#top libhttp


netutils - Narzędzia Sieciowe >> libnet - library network protocols >> libhttp - Hypertext Transfer Protocol

RFC 1945 - Hypertext Transfer Protocol -- HTTP/1.0
RFC 2616 - Hypertext Transfer Protocol -- HTTP/1.1
Hypertext Transfer Protocol (en.wiki) | Hypertext Transfer Protocol (pl.wiki)



#top Predefined Constants


#top LIBHTTP_CONNSTEP*


Definicja stałej LIBHTTP_CONNSTEP1 i LIBHTTP_CONNSTEP2 znajduje się w pliku nagłówkowym netutils/libhttp.h.
Definicja stałej LIBHTTP_CONNSTEP1 i LIBHTTP_CONNSTEP2 jest następująca:
/* http_conn() - options */
#define LIBHTTP_CONNSTEP1       0x0001
#define LIBHTTP_CONNSTEP2       0x0002



#top enum HTTPoption


Definicja typu enum HTTPoption znajduje się w pliku nagłówkowym netutils/libhttp.h.
Definicja typu enum HTTPoption jest następująca:
enum HTTPoption {
/* http_setopt(), http_getopt(), */
HTTPOPT_DEBUG = 1,
HTTPOPT_QUIET,

HTTPOPT_DNSQADDR,
HTTPOPT_DNSQTIMEO,
HTTPOPT_AFFAMILY,

HTTPOPT_TIMEOCONN,
HTTPOPT_TIMEOSOCK,

HTTPOPT_REUSEADDR,
HTTPOPT_REUSEPORT,
HTTPOPT_SNDTIMEO,
HTTPOPT_RCVTIMEO,
HTTPOPT_SNDBUF,
HTTPOPT_RCVBUF,
HTTPOPT_SNDLOWAT,
HTTPOPT_RCVLOWAT,
HTTPOPT_KEEPALIVE,
HTTPOPT_NODELAY,
HTTPOPT_BINDADDR,

HTTPOPT_SOCKSEND,
HTTPOPT_SOCKRECV,
HTTPOPT_SOCKINFO,
HTTPOPT_COMMSEND,
HTTPOPT_COMMRECV,
HTTPOPT_DATASEND,
HTTPOPT_DATARECV,

HTTPOPT_TLSNAME,
HTTPOPT_TLSVER,
HTTPOPT_CAFILE,
HTTPOPT_CRLFILE,
HTTPOPT_CRTFILE,
HTTPOPT_KEYFILE,
HTTPOPT_TLSINFO,
HTTPOPT_CERTCHECK,
HTTPOPT_CERTVERIFY,
HTTPOPT_CERTINFO,
HTTPOPT_CERTSHOW,

HTTPOPT_PROXYURL,
HTTPOPT_PROXYTUNNEL,
HTTPOPT_PROXYSOCKS,



/*RFC 2616 - Request-Line = Method SP Request-URI SP HTTP-Version CRLF */
HTTPOPT_METHOD,
HTTPOPT_REQUESTURI,
HTTPOPT_HTTPVER,
HTTPOPT_AUTHSEND,

HTTPOPT_HEADER,

HTTPOPT_POSTDATA,
HTTPOPT_POSTSIZE,
HTTPOPT_POSTFILE,
HTTPOPT_PUTDATA,
HTTPOPT_PUTSIZE,
HTTPOPT_PUTFILE,

HTTPOPT_DNS_SERVERS,

/* opt get */
HTTPOPT_HTTPCODE,
HTTPOPT_HTTPLINE,
HTTPOPT_LOCATION,

HTTPOPT_LASTMODIFIED,
HTTPOPT_LASTMODTIME,
HTTPOPT_CONTLENGTH,
HTTPOPT_FILENAME,

/* last option without coma at the end, to skip: warning: comma at end of enumerator list */
HTTPOPT_LASTNULL
};



#top Datatypes / MACROS


#top __SOCKADDR_COMMON


Definicja typu __SOCKADDR_COMMON znajduje się w pliku nagłówkowym bits/sockaddr.h.
Definicja typu __SOCKADDR_COMMON jest następująca:
/* This macro is used to declare the initial common members
   of the data types used for socket addresses, `struct sockaddr',
   `struct sockaddr_in', `struct sockaddr_un', etc.  */
#define __SOCKADDR_COMMON(sa_prefix) \
  sa_family_t sa_prefix##family



#top __socklen_t


Definicja typu __socklen_t znajduje się w pliku nagłówkowym bits/types.h.
Definicja typu __socklen_t jest następująca:
/* Duplicate info from sys/socket.h.  */
__STD_TYPE __U32_TYPE __socklen_t;



#top __time_t


Definicja typu __time_t znajduje się w pliku nagłówkowym bits/types.h.
Definicja typu __time_t jest następująca:
__STD_TYPE __TIME_T_TYPE __time_t;        /* Seconds since the Epoch.  */



#top enum tlse_starttls_mode


Definicja typu enum tlse_starttls_mode znajduje się w pliku nagłówkowym netutils/libsocktls.h.
Definicja typu enum tlse_starttls_mode jest następująca:
enum tlse_starttls_mode {
	tlse_starttls_server=1,
	tlse_starttls_client=2
} tlse_starttls_mode; /* kind type of secure protocol: server or client */



#top enum tlse_proto_type


Definicja typu enum tlse_proto_type znajduje się w pliku nagłówkowym netutils/libsocktls.h.
Definicja typu enum tlse_proto_type jest następująca:
enum tlse_proto_type {
	tlse_proto_auto   =  0,
	tlse_proto_sslv3x =  2,
	tlse_proto_tlsv10 =  3,
	tlse_proto_tlsv11 =  4,
	tlse_proto_tlsv12 =  5,
	tlse_proto_tlsv13 =  6,
	tlse_proto_dtlsv09=  7,
	tlse_proto_dtlsv10=  8,
	tlse_proto_dtlsv12= 10,
	tlse_proto_NULL   =255
} tlse_proto_type; /* type of secure protocol to use. */



#top in_addr_t


Definicja struktury in_addr_t znajduje się w pliku nagłówkowym netinet/in.h.
Definicja struktury in_addr_t jest następująca:
/* Internet address.  */
typedef uint32_t in_addr_t;



#top in_port_t


Definicja struktury in_port_t znajduje się w pliku nagłówkowym netinet/in.h.
Definicja struktury in_port_t jest następująca:
/* Type to represent a port.  */
typedef uint16_t in_port_t;



#top sa_family_t


Definicja typu sa_family_t znajduje się w pliku nagłówkowym bits/sockaddr.h.
Definicja typu sa_family_t jest następująca:
/* POSIX.1g specifies this type name for the `sa_family' member.  */
typedef unsigned short int sa_family_t;



#top size_t


Definicja typu size_t znajduje się w pliku nagłówkowym /usr/lib/gcc/i386-redhat-linux/4.1.1/include/stddef.h.
Definicja typu size_t jest następująca:
/* Unsigned type of `sizeof' something.  */

/* Define this type if we are doing the whole job,
   or if we want this type in particular.  */
#if defined (_STDDEF_H) || defined (__need_size_t)
#ifndef __size_t__  /* BeOS */
#ifndef __SIZE_T__  /* Cray Unicos/Mk */
#ifndef _SIZE_T /* in case <sys/types.h> has defined it. */
#ifndef _SYS_SIZE_T_H
#ifndef _T_SIZE_
#ifndef _T_SIZE
#ifndef __SIZE_T
#ifndef _SIZE_T_
#ifndef _BSD_SIZE_T_
#ifndef _SIZE_T_DEFINED_
#ifndef _SIZE_T_DEFINED
#ifndef _BSD_SIZE_T_DEFINED_    /* Darwin */
#ifndef _SIZE_T_DECLARED    /* FreeBSD 5 */
#ifndef ___int_size_t_h
#ifndef _GCC_SIZE_T
#ifndef _SIZET_
#ifndef __size_t
#define __size_t__  /* BeOS */
#define __SIZE_T__  /* Cray Unicos/Mk */
#define _SIZE_T
#define _SYS_SIZE_T_H
#define _T_SIZE_
#define _T_SIZE
#define __SIZE_T
#define _SIZE_T_
#define _BSD_SIZE_T_
#define _SIZE_T_DEFINED_
#define _SIZE_T_DEFINED
#define _BSD_SIZE_T_DEFINED_    /* Darwin */
#define _SIZE_T_DECLARED    /* FreeBSD 5 */
#define ___int_size_t_h
#define _GCC_SIZE_T
#define _SIZET_
#if defined (__FreeBSD__) && (__FreeBSD__ >= 5)
/* __size_t is a typedef on FreeBSD 5!, must not trash it. */
#else
#define __size_t
#endif
#ifndef __SIZE_TYPE__
#define __SIZE_TYPE__ long unsigned int
#endif
#if !(defined (__GNUG__) && defined (size_t))
typedef __SIZE_TYPE__ size_t;
#ifdef __BEOS__
typedef long ssize_t;
#endif /* __BEOS__ */
#endif /* !(defined (__GNUG__) && defined (size_t)) */
#endif /* __size_t */
#endif /* _SIZET_ */
#endif /* _GCC_SIZE_T */
#endif /* ___int_size_t_h */
#endif /* _SIZE_T_DECLARED */
#endif /* _BSD_SIZE_T_DEFINED_ */
#endif /* _SIZE_T_DEFINED */
#endif /* _SIZE_T_DEFINED_ */
#endif /* _BSD_SIZE_T_ */
#endif /* _SIZE_T_ */
#endif /* __SIZE_T */
#endif /* _T_SIZE */
#endif /* _T_SIZE_ */
#endif /* _SYS_SIZE_T_H */
#endif /* _SIZE_T */
#endif /* __SIZE_T__ */
#endif /* __size_t__ */
#undef  __need_size_t
#endif /* _STDDEF_H or __need_size_t.  */



#top SOCKET


Definicja typu SOCKET znajduje się w pliku nagłówkowym libsocknet.h.
Definicja typu SOCKET jest następująca:
#if defined(__WIN32__) || defined(WIN32) || defined(_WIN32)
/*typedef u_int SOCKET;*/
/*
C:/Dev-CPP/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winsock.h:32: error:
  conflicting types for 'SOCKET'
../../libinc/datatypes.h:33: error: previous declaration of 'SOCKET' was here
*/
#else
typedef int SOCKET;
#endif



#top socklen_t


Definicja typu socklen_t znajduje się w pliku nagłówkowym bits/socket.h.
Definicja typu socklen_t jest następująca:
/* Type for length arguments in socket calls.  */
#ifndef __socklen_t_defined
typedef __socklen_t socklen_t;
# define __socklen_t_defined
#endif



#top socktls_session_t


Definicja struktury socktls_session_t znajduje się w pliku nagłówkowym libnet/libsocktls.h.
Definicja struktury socktls_session_t jest następująca:
typedef void* socktls_session_t;



#top struct _http


Definicja struktury struct _http znajduje się w pliku nagłówkowym libnet/libhttp.h.
Definicja struktury struct _http jest następująca:
struct _http {
	const char *self;
	short int argquiet;
	short int argdebug;
	
	short int isterm;
	char *C_NORMAL;
	
	char *C_SEND;
	char *C_LINE;
	
	char *C_OK;
	char *C_WARN;
	char *C_FAIL;
	char *C_ERR;
	
	
	
	short int argsocksend;
	short int argsockrecv;
	short int argsockinfo;
	short int argcommsend;
	short int argcommrecv;
	short int argdatasend;
	short int argdatarecv;
	
	short int argtlsinfo;
	short int argcertcheck;
	short int argcertverify;
	short int argcertinfo;
	short int argcertshow;
	
	
	
	struct URLInfo *urlsinfo, urlsdata;
	
	double dnsqtimeo;
	char  *dnsqaddr;
	char   ipaddr[DMAXHOST6ADDR];
	
	short int REUSEADDR;
	short int REUSEPORT;
	int SNDTIMEO;
	int RCVTIMEO;
	int SNDBUF;
	int RCVBUF;
	short int SNDLOWAT;
	short int RCVLOWAT;
	short int KEEPALIVE;
	short int NODELAY;
	
	char  *bindaddr;
	
	double timeoconn;
	double timeosock;
	
	char tlsname[DMAXHOSTNAME];
	struct addrinfo *addrlist;
	sa_family_t af_family;
	SOCKET osock;
	char *x509_cafile;
#ifdef HAVE_LIBTLS
	enum tlse_proto_type opt_proto_type;
	struct SOCKTLS_CTX_ST *ssl_ctx;
	socktls_session_t      ssl;
#endif
	
	/** @name proxy */
	short int proxytalk; /* proxyneed==1 - talking with proxy - not with the destination server */
	struct URLInfo viaxdata, *viaxinfo;
	short int proxytunnel;
	short int proxysocks;
	
	
	
	double dnsq;
	double conn;
	/*double bann;*/
	/*double starttls;*/
	double socktls;
	/*double auth;*/
	/*double quit;*/
	
	double send;
	double recv;
	double wait;
	
	
	
	
	int    istatus;
	char   sstatus[256];
	
	size_t speed;
	long long int size;
	/* size_t filesize; */ /* NOTE: use: contentlength */
	
	size_t shsize; /* send body size */
	size_t sbsize; /* send head size */
	size_t rhsize; /* recv head size */
	size_t rbsize; /* recv body size */
	
	
	
	short int state;
	short int argsendauth;
	/** @name HTTP head request */
struct {
	char method[16];         /* GET */ /* HEAD */ /* POST */ /* PUT */ /* DELETE */ /* OPTIONS */
	char httpver[16];        /* HTTP/1.0 */ /*HTTP/1.1 */
	char httphost[1025];     /* Host: example.org */
	char httpua[256];        /* User-Agent: Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.9.2.18) Gecko/20110622 CentOS/3.6-1.el5.centos Firefox/3.6.18 */
	char httpaccept[64];     /* Accept: text/html,application/xhtml+xml,application/xml;q=0.9,* / *;q=0.8 */
	char httplang[32];       /* Accept-Language: pl,en-us;q=0.7,en;q=0.3 */
	char httpcharset[32];    /* Accept-Charset: UTF-8,* */
	char httpencoding[32];   /* Accept-Encoding: gzip,deflate */
	char httpconttype[256];  /* Content-Type: application/x-www-form-urlencoded */ /* Content-Type: multipart/form-data; boundary=****** */
	char httplength[16];     /* Content-Length: ***** */ /* char for allow set 0 and detect when it is set */
	
	char referer[8192];      /* Referer: http://... */
	char range[32];          /* Range: 0-999 */
	
	char connhttp[32];       /* Connection: close */       /* Connection: keep-alive */
	char connviax[32];       /* Proxy-Connection: close */ /* Proxy-Connection: keep-alive */
} S;
	char headlist[4*1024];   /* Additional HTTP Headers */
	
	
	
	int  fdcont;
	char boundary[64];
	char  *senddata;         /* data for POST / PUT */
	long long int sendsize;
	/*char *sendfile;*/      /* file for POST / PUT */
	char sendfile[4*1024];   /* file for POST / PUT */
	
	
	
	/** @name HTTP head response */
struct {
	char      httpline[256];       /* HTTP/1.1 200 OK */ /* HTTP/1.1 301 Redirect */ /* HTTP/1.1 400 Bad Request */ /* HTTP/1.1 401 Authorization */ /* HTTP/1.1 403 Forbidden */ /* HTTP/1.1 404 Not Found */ /* HTTP/1.1 500 Internal Error */
	short int httpcode;            /* 200 301 400 401 403 404 500 */
	char     *httptext;            /* OK */ /* Redirect */ /* Bad Request */ /* Authorization */ /* Forbidden */ /* Not Found */ /* Internal Error */
	
	char   httpauthrecv[512];      /* WWW-Authenticate: Basic    | WWW-Authenticate: Digest ...    | WWW-Authenticate: NTLM ...    */
	char   httpauthsend[256];      /* Authorization: Basic       | Authorization: Digest ...       | Authorization: NTLM ...       */
	char   viaxauthrecv[512];      /* Proxy-Authenticate: Basic  | Proxy-Authenticate: Digest ...  | Proxy-Authenticate: NTLM ...  */
	char   viaxauthsend[256];      /* PRoxy-Authorization: Basic | PRoxy-Authorization: Digest ... | PRoxy-Authorization: NTLM ... */
	
	time_t lastmodtime;
	char   lastmodified[48];       /* Last-Modified: Wed, 11 Nov 2015 20:47:08 GMT */
	char contenttype[100];         /* Content-Type: text/plain; charset=UTF-8 */
	char charset[32];              /* charset=UTF-8 - from Content-Type: */
	char filename[1024];           /* Content-Disposition: inline; filename="filename-header-content-disposition.html" */
	char contentencoding[64];      /* Content-Encoding: gzip */
	/* contentlength is signed for enable to check if there is no Content-Length header */
	long long int contentlength;   /* Content-Length: 13 */
	short int chunked;             /* Transfer-Encoding: chunked */
	
	char location[8192];           /* Location: http://... */
	
	char httpconn[32];             /* Connection: close */       /* Connection: keep-alive */
	char viaxconn[32];             /* Proxy-Connection: close */ /* Proxy-Connection: keep-alive */
	
	/** @name response head version */
	short int httpd_head, nginx_head, lighttpd_head, iis_head;
	char version     [ 256];
	char httpverhdrs [  64];
	char httpserver  [ 256];
	char httppowerdby[ 256];
	char httpvia     [ 256];
} R;
	
};



#top struct addrinfo


Deklaracja struktury struct addrinfo znajduje się w pliku nagłówkowym netdb.h.
Deklaracja struktury struct addrinfo jest następująca:
/* Structure to contain information about address of a service provider.  */
struct addrinfo
{
  int ai_flags;         /* Input flags.  */
  int ai_family;        /* Protocol family for socket.  */
  int ai_socktype;      /* Socket type.  */
  int ai_protocol;      /* Protocol for socket.  */
  socklen_t ai_addrlen;     /* Length of socket address.  */
  struct sockaddr *ai_addr; /* Socket address for socket.  */
  char *ai_canonname;       /* Canonical name for service location.  */
  struct addrinfo *ai_next; /* Pointer to next in list.  */
};



#top struct in_addr


Deklaracja struktury struct in_addr znajduje się w pliku nagłówkowym netinet/in.h.
Deklaracja struktury struct in_addr jest następująca:
/* Internet address.  */
struct in_addr
  {
    in_addr_t s_addr;
  };



#top struct in6_addr


Deklaracja struktury struct in6_addr znajduje się w pliku nagłówkowym netinet/in.h.
Deklaracja struktury struct in6_addr jest następująca:
/* IPv6 address */
struct in6_addr
  {
    union
      {
    uint8_t u6_addr8[16];
    uint16_t u6_addr16[8];
    uint32_t u6_addr32[4];
      } in6_u;
#define s6_addr         in6_u.u6_addr8
#define s6_addr16       in6_u.u6_addr16
#define s6_addr32       in6_u.u6_addr32
  };



#top struct sockaddr


Deklaracja struktury struct sockaddr znajduje się w pliku nagłówkowym bits/socket.h.
Deklaracja struktury struct sockaddr jest następująca:
/* Structure describing a generic socket address.  */
struct sockaddr
  {
    __SOCKADDR_COMMON (sa_);    :* Common data: address family and length.  */
    char sa_data[14];       /* Address data.  */
  };



#top struct sockaddr_in


Deklaracja struktury struct sockaddr_in znajduje się w pliku nagłówkowym netinet/in.h.
Deklaracja struktury struct sockaddr_in jest następująca:
/* Structure describing an Internet socket address.  */
struct sockaddr_in
  {
    __SOCKADDR_COMMON (sin_);
    in_port_t sin_port;         /* Port number.  */
    struct in_addr sin_addr;        /* Internet address.  */

    /* Pad to size of `struct sockaddr'.  */
    unsigned char sin_zero[sizeof (struct sockaddr) -
               __SOCKADDR_COMMON_SIZE -
               sizeof (in_port_t) -
               sizeof (struct in_addr)];
  };



#top struct sockaddr_in6


Deklaracja struktury struct sockaddr_in6 znajduje się w pliku nagłówkowym netinet/in.h.
Deklaracja struktury struct sockaddr_in6 jest następująca:
/* Ditto, for IPv6.  */
struct sockaddr_in6
  {
    __SOCKADDR_COMMON (sin6_);
    in_port_t sin6_port;    /* Transport layer port # */
    uint32_t sin6_flowinfo; /* IPv6 flow information */
    struct in6_addr sin6_addr;  /* IPv6 address */
    uint32_t sin6_scope_id; /* IPv6 scope-id */
  };



#top struct sockaddr_un


Deklaracja struktury struct sockaddr_un znajduje się w pliku nagłówkowym sys/un.h.
Deklaracja struktury struct sockaddr_un jest następująca:
/* Structure describing the address of an AF_LOCAL (aka AF_UNIX) socket.  */
struct sockaddr_un
  {
    __SOCKADDR_COMMON (sun_);
    char sun_path[108];     /* Path name.  */
  };



#top struct SOCKTLS_CTX_ST


Definicja struktury struct SOCKTLS_CTX_ST znajduje się w pliku nagłówkowym libnet/libsocktls.h.
Definicja struktury struct SOCKTLS_CTX_ST jest następująca:
typedef struct SOCKTLS_CTX_ST SOCKTLS_CTX;



#top struct tm


Definicja struktury struct tm znajduje się w pliku nagłówkowym time.h.
Definicja struktury struct tm jest następująca:
/* Used by other time functions.  */
struct tm
{
  int tm_sec;           /* Seconds. [0-60] (1 leap second) */
  int tm_min;           /* Minutes. [0-59] */
  int tm_hour;          /* Hours.   [0-23] */
  int tm_mday;          /* Day.     [1-31] */
  int tm_mon;           /* Month.   [0-11] */
  int tm_year;          /* Year - 1900.  */
  int tm_wday;          /* Day of week. [0-6] */
  int tm_yday;          /* Days in year.[0-365] */
  int tm_isdst;         /* DST.     [-1/0/1]*/

#ifdef  __USE_BSD
  long int tm_gmtoff;       /* Seconds east of UTC.  */
  __const char *tm_zone;    /* Timezone abbreviation.  */
#else
  long int __tm_gmtoff;     /* Seconds east of UTC.  */
  __const char *__tm_zone;  /* Timezone abbreviation.  */
#endif
};



#top struct URLInfo


Definicja struktury struct URLInfo znajduje się w pliku nagłówkowym libnet/string.h.
Definicja struktury struct URLInfo jest następująca:
struct URLInfo {
	/* 12     + 3 + 64 + 1 + 64 + 1 + DMAXHOSTNAME + 1 + DMAXHOSTPORT + 8192 */
	/* scheme   :// user :   pass :   host           :   port           /path?query#anchor */
	char buffurls[12+3+256+1+256+1+/*DMAXHOSTNAME*/1025+1+/*DMAXHOSTPORT*/6+8192];
	char scheme[25];
	char host[/*DMAXHOSTNAME*/1025];
	char port[/*DMAXHOSTPORT*/6];
	int  iaport;
	char user[256];
	char pass[256];
	char *path;
	char *query;
	char *anchor;
};



#top time_t


Definicja typu time_t znajduje się w pliku nagłówkowym time.h.
Definicja typu time_t jest następująca:
#if !defined __time_t_defined && (defined _TIME_H || defined __need_time_t)
# define __time_t_defined   1

# include <bits/types.h>

__BEGIN_NAMESPACE_STD
/* Returned by `time'.  *:
typedef __time_t time_t;
__END_NAMESPACE_STD
#if defined __USE_POSIX || defined __USE_MISC || defined __USE_SVID
__USING_NAMESPACE_STD(time_t)
#endif

#endif /* time_t not defined and <time.h> or need time_t.  */



#top uint8_t


Definicja typu uint8_t znajduje się w pliku nagłówkowym stdint.h.
Definicja typu uint8_t jest następująca:
/* Unsigned.  */
typedef unsigned char       uint8_t;



#top uint16_t


Definicja typu uint16_t znajduje się w pliku nagłówkowym stdint.h.
Definicja typu uint16_t jest następująca:
/* Unsigned.  */
typedef unsigned short int  uint16_t;



#top uint32_t


Definicja typu uint32_t znajduje się w pliku nagłówkowym stdint.h.
Definicja typu uint32_t jest następująca:
/* Unsigned.  */
#ifndef __uint32_t_defined
typedef unsigned int        uint32_t;
# define __uint32_t_defined
#endif



#top libhttp Functions


#top http_conn


Deklaracja funkcji http_conn() znajduje się w pliku nagłówkowym libnet/libhttp.h.
Deklaracja funkcji http_conn() jest następująca:
SELECT ALL
int http_conn(struct _http *http, const short int options);

Funkcja http_conn()

Argumenty:
struct _http *http -
const short int options - LIBHTTP_CONNSTEP1, LIBHTTP_CONNSTEP2,

Zwracana wartość:
int -



#top http_close


Deklaracja funkcji http_close() znajduje się w pliku nagłówkowym libnet/libhttp.h.
Deklaracja funkcji http_close() jest następująca:
SELECT ALL
int htt_close(struct _http *http);

Funkcja http_close()

Argumenty:
struct _http *http -

Zwracana wartość:
int -



#top http_socktls


Deklaracja funkcji http_socktls() znajduje się w pliku nagłówkowym libnet/libhttp.h.
Deklaracja funkcji http_socktls() jest następująca:
SELECT ALL
int http_socktls(struct _http *http);

Funkcja http_socktls()

Argumenty:
struct _http *http -

Zwracana wartość:
int -



#top http_tlsinfo


Deklaracja funkcji http_tlsinfo() znajduje się w pliku nagłówkowym libnet/libhttp.h.
Deklaracja funkcji http_tlsinfo() jest następująca:
SELECT ALL
int http_tlsinfo(struct _http *http);

Funkcja http_tlsinfo()

Argumenty:
struct _http *http -

Zwracana wartość:
int -



#top http_send


Deklaracja funkcji http_send() znajduje się w pliku nagłówkowym libnet/libhttp.h.
Deklaracja funkcji http_send() jest następująca:
SELECT ALL
int http_send(struct _http *http, const char *buffdata, const size_t buffsize);

Funkcja http_send()

Argumenty:
struct _http *http -
const char *buffdata -
const size_t buffsize -

Zwracana wartość:
int -



#top http_recv


Deklaracja funkcji http_recv() znajduje się w pliku nagłówkowym libnet/libhttp.h.
Deklaracja funkcji http_recv() jest następująca:
SELECT ALL
int http_recv(struct _http *http, const char *buffdata, const size_t buffsize);

Funkcja http_recv()

Argumenty:
struct _http *http -
const char *buffdata -
const size_t buffsize -

Zwracana wartość:
int -



#top http_onerecv


Deklaracja funkcji http_onerecv() znajduje się w pliku nagłówkowym libnet/libhttp.h.
Deklaracja funkcji http_onerecv() jest następująca:
SELECT ALL
int http_onerecv(struct _http *http, const char *buffdata, const size_t buffsize);

Funkcja http_onerecv()

Argumenty:
struct _http *http -
const char *buffdata -
const size_t buffsize -

Zwracana wartość:
int -



#top http_linerecv


Deklaracja funkcji http_linerecv() znajduje się w pliku nagłówkowym libnet/libhttp.h.
Deklaracja funkcji http_linerecv() jest następująca:
SELECT ALL
int http_linerecv(struct _http *http, const char *buffdata, const size_t buffsize);

Funkcja http_linerecv()

Argumenty:
struct _http *http -
const char *buffdata -
const size_t buffsize -

Zwracana wartość:
int -



#top sock_chunksend


Deklaracja funkcji sock_chunksend() znajduje się w pliku nagłówkowym libnet/libhttp.h.
Deklaracja funkcji sock_chunksend() jest następująca:
SELECT ALL
/**
 * @name    sock_chunksend()
 * @desc    sock_chunksend()
 * @param   const:SOCKET osock
 * @param   const:char  *buffdata
 * @param   const:size_t buffsize
 * @param   const:double timeosock
 * @return  int          chunksize
 */
int sock_chunksend(const SOCKET osock, const char *buffdata, const size_t buffsize, const double timeosock);

Powiązane:
sock_chunksend(), sock_chunkrecv(),

Opis:
Funkcja sock_chunksend() podobnie jak funkcja sock_send() do systemu zdalnego będącego drugą stroną połączenia dla deskryptora przekazanego w argumencie osock wysyła (zapisuje) dane przekazane w argumencie buffdata (ilość danych do wysłania podana jest w argumencie buffsize) ograniczonego czasem trwania podanego w argumencie timeosock. W odróżnieniu od funkcji sock_send() dane wysyłane są zgodnie z formatem RFC2616 - 3.6.1 Chunked Transfer Coding. W przypadku gdy wszyskie przekazane dane zostały wysłane w czasie mniejszym niż podany to zwracana jest wartość dodatnia informująca o ilości wysłanych danych (będzie zgodna z ilością podaną w argumencie buffsize), w przeciwnym przypadku (lub również w przypadku przekroczenia podanego limitu czasu na wysyłanie danych, ale bez błedu podczas wysyłania) zwracany jest ujemny kod błędu informujący o przekroczeniu limitu czasu na wysyłanie danych lub informujący o innym błędzie, który wystąpił podczas wysyłania.

Argumenty:
const SOCKET osock - deskryptor gniazda sieciowego
const char *buffdata - wskaźnik do bufora z danymi do wysłania
const size_t buffsize - ilość danych do wysłania
const double timeosock - limit czasu na wysyłanie danych

Zwracana wartość:
int - wynik (status) wysyłania danych (dodatnia wartość oznacza ilość wysłanych danych, ujemna wartość oznacza kod błedu informujący o przyczynie braku możliwości wysłania danych)



#top sock_chunkrecv


Deklaracja funkcji sock_chunkrecv() znajduje się w pliku nagłówkowym libnet/libhttp.h.
Deklaracja funkcji sock_chunkrecv() jest następująca:
SELECT ALL
/**
 * @name    sock_chunkrecv()
 * @desc    sock_chunkrecv()
 * @param   const:SOCKET osock
 * @param   char        *buffdata
 * @param   const:size_t buffsize
 * @param   const:double timeosock
 * @return  int          chunksize
 */
int sock_chunkrecv(const SOCKET osock, char *buffdata, const size_t buffsize, const double timeosock);

Powiązane:
sock_chunksend(), sock_chunkrecv(),

Opis:
Funkcja sock_chunkrecv() podobnie jak funkcja sock_recv() od systemu zdalnego będącego drugą stroną połączenia dla deskryptora przekazanego w argumencie osock odbierane (odczytywane) dane umieszcza w argumencie buffdata (ilość danych do odebrania podana jest w argumencie buffsize) ograniczonego czasem trwania podanego w argumencie timeosock.
W odróżnieniu od funkcji sock_recv() dane odbierane są zgodnie z formatem RFC2616 - 3.6.1 Chunked Transfer Coding. W przypadku gdy dane o dowolnej ilości lecz nie większej niż określonej w argumencie buffsize zostały odebrane w czasie mniejszym niż podany to zwracana jest wartość dodatnia informująca o ilości odebranych danych, w przeciwnym przypadku (lub również w przypadku przekroczenia podanego limitu czasu na odbieranie danych) zwracany jest ujemny kod błędu informujący o przekroczeniu limitu czasu na odbieranie danych lub informujący o innym błędzie, który wystąpił podczas odbierania.

Argumenty:
const SOCKET osock - deskryptor gniazda sieciowego
char *buffdata - wskaźnik do bufora na dane do odebrania
const size_t buffsize - maksymalna silość danych do odebrania
const double timeosock - limit czasu na wysyłanie danych

Zwracana wartość:
int - wynik (status) odbierania danych (dodatnia wartość lub zero oznacza ilość odebranych danych, ujemna wartość oznacza kod błedu informujący o przyczynie braku możliwości odebrania danych)



#top http_init


Deklaracja funkcji http_init() znajduje się w pliku nagłówkowym libnet/libhttp.h.
Deklaracja funkcji http_init() jest następująca:
SELECT ALL
int http_init(struct _http *http);

Funkcja http_init()

Argumenty:
struct _http *http -

Zwracana wartość:
int -



#top http_head_add


Deklaracja funkcji http_head_add() znajduje się w pliku nagłówkowym libnet/libhttp.h.
Deklaracja funkcji http_head_add() jest następująca:
SELECT ALL
int http_head_add(struct _http *http, const char *name, const char *value);

Funkcja http_head_add()

Argumenty:
struct _http *http -
const char *name -
const char *value -

Zwracana wartość:
int -



#top http_setopt


Deklaracja funkcji http_setopt() znajduje się w pliku nagłówkowym libnet/libhttp.h.
Deklaracja funkcji http_setopt() jest następująca:
SELECT ALL
int http_setopt(struct _http *http, const enum HTTPoption option, const void *optval);

Funkcja http_setopt()

Argumenty:
struct _http *http -
const enum HTTPoption option -
const void *optval -

Zwracana wartość:
int -



#top http_getopt


Deklaracja funkcji http_getopt() znajduje się w pliku nagłówkowym libnet/libhttp.h.
Deklaracja funkcji http_getopt() jest następująca:
SELECT ALL
int http_getopt(struct _http *http, const enum HTTPoption option, void *optval, const size_t optlen);

Funkcja http_getopt()

Argumenty:
struct _http *http -
const enum HTTPoption option -
void *optval -
size_t -

Zwracana wartość:
int -



#top http_getiopt


Deklaracja funkcji http_getiopt() znajduje się w pliku nagłówkowym libnet/libhttp.h.
Deklaracja funkcji http_getiopt() jest następująca:
SELECT ALL
long long int http_getiopt(struct _http *http, const enum HTTPoption option, int *status);

Funkcja http_getiopt()

Argumenty:
struct _http *http -
const enum HTTPoption option -
int *status -

Zwracana wartość:
int -



#top http_make_requ_proxy


Deklaracja funkcji http_make_requ_proxy() znajduje się w pliku nagłówkowym libnet/libhttp.h.
Deklaracja funkcji http_make_requ_proxy() jest następująca:
SELECT ALL
int http_make_requ_proxy(struct _http *http);

Funkcja http_make_requ_proxy()

Argumenty:
struct _http *http -

Zwracana wartość:
int -



#top http_make_requ_head


Deklaracja funkcji http_make_requ_head() znajduje się w pliku nagłówkowym libnet/libhttp.h.
Deklaracja funkcji http_make_requ_head() jest następująca:
SELECT ALL
int http_make_requ_head(struct _http *http);

Funkcja http_make_requ_head()

Argumenty:
struct _http *http -

Zwracana wartość:
int -



#top http_resp_head


Deklaracja funkcji http_resp_head() znajduje się w pliku nagłówkowym libnet/libhttp.h.
Deklaracja funkcji http_resp_head() jest następująca:
SELECT ALL
int http_resp_head(struct _http *http, char *headrecv, const size_t headsize);

Funkcja http_resp_head()

Argumenty:
struct _http *http -
char *headrecv -
const size_t headsize -

Zwracana wartość:
int -



#top http_resp_body


Deklaracja funkcji http_resp_body() znajduje się w pliku nagłówkowym libnet/libhttp.h.
Deklaracja funkcji http_resp_body() jest następująca:
SELECT ALL
int http_resp_body(struct _http *http, char *bodyrecv, const size_t bodysize);

Funkcja http_resp_body()

Argumenty:
struct _http *http -
char *bodyrecv -
const size_t bodysize -

Zwracana wartość:
int -



#top http_exec


Deklaracja funkcji http_exec() znajduje się w pliku nagłówkowym libnet/libhttp.h.
Deklaracja funkcji http_exec() jest następująca:
SELECT ALL
int http_exec(struct _http *http);

Funkcja http_exec()

Argumenty:
struct _http *http -

Zwracana wartość:
int -









































Zmodyfikowany ostatnio: 2019/07/04 10:33:15 (6 lat temu), textsize: 39,4 kB, htmlsize: 66,5 kB

Zapraszam do komentowania, zgłaszania sugestii, propozycji, własnych przykładów, ...
Dodaj komentarzKomentarze użytkowników