/[hyperestraier]/upstream/0.5.3/estnode.h
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /upstream/0.5.3/estnode.h

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

upstream/0.5.1/estnode.h revision 2 by dpavlin, Fri Jul 29 21:56:53 2005 UTC upstream/0.5.3/estnode.h revision 10 by dpavlin, Wed Aug 3 15:25:48 2005 UTC
# Line 36  extern "C" { Line 36  extern "C" {
36    
37    
38  /* Initialize the networking environment.  /* Initialize the networking environment.
39     The return value is true if success, else it is false. */     The return value is true if success, else it is false.
40       As it is allowable to call this function multiple times, it is needed to call the function
41       `est_free_net_env' at the same frequency. */
42  int est_init_net_env(void);  int est_init_net_env(void);
43    
44    
# Line 137  typedef struct { Line 139  typedef struct {
139    char *pxhost;                          /* host name of the proxy */    char *pxhost;                          /* host name of the proxy */
140    int pxport;                            /* port number of the proxy */    int pxport;                            /* port number of the proxy */
141    int timeout;                           /* timeout in seconds */    int timeout;                           /* timeout in seconds */
142    char *auth;                            /* authority */    char *auth;                            /* authentication information */
143    char *name;                            /* name */    char *name;                            /* name */
144    char *label;                           /* label */    char *label;                           /* label */
145    int dnum;                              /* number of documents */    int dnum;                              /* number of documents */
# Line 159  ESTNODE *est_node_new(const char *url); Line 161  ESTNODE *est_node_new(const char *url);
161  void est_node_delete(ESTNODE *node);  void est_node_delete(ESTNODE *node);
162    
163    
 /* Get the status code of the last request of a node.  
    `node' specifies a node connection object.  
    The return value is the status code of the last request of the node.  -1 means failure of  
    connection. */  
 int est_node_status(ESTNODE *node);  
   
   
164  /* Set the proxy information of a node connection object.  /* Set the proxy information of a node connection object.
165     `node' specifies a node connection object.     `node' specifies a node connection object.
166     `host' specifies the host name of a proxy server.     `host' specifies the host name of a proxy server.
# Line 179  void est_node_set_proxy(ESTNODE *node, c Line 174  void est_node_set_proxy(ESTNODE *node, c
174  void est_node_set_timeout(ESTNODE *node, int sec);  void est_node_set_timeout(ESTNODE *node, int sec);
175    
176    
177  /* Set the authoririty information of a node connection object.  /* Set the authentication information of a node connection object.
178     `node' specifies a node connection object.     `node' specifies a node connection object.
179     `name' specifies the name of an authority.     `name' specifies the name of authentication.
180     `passwd' specifies the password of the authority. */     `passwd' specifies the password of the authentication. */
181  void est_node_set_auth(ESTNODE *node, const char *name, const char *passwd);  void est_node_set_auth(ESTNODE *node, const char *name, const char *passwd);
182    
183    
184    /* Get the status code of the last request of a node.
185       `node' specifies a node connection object.
186       The return value is the status code of the last request of the node.  -1 means failure of
187       connection. */
188    int est_node_status(ESTNODE *node);
189    
190    
191  /* Add a document to a node.  /* Add a document to a node.
192     `node' specifies a node connection object.     `node' specifies a node connection object.
193     `doc' specifies a document object.  The document object should have the URI attribute.     `doc' specifies a document object.  The document object should have the URI attribute.
# Line 348  int est_get_server_sock(const char *addr Line 350  int est_get_server_sock(const char *addr
350  /* Accept a connection from a client.  /* Accept a connection from a client.
351     `sock' specifies a server socket.     `sock' specifies a server socket.
352     `abuf' specifies a buffer into which the address of a connected client is written.  The size of     `abuf' specifies a buffer into which the address of a connected client is written.  The size of
353     the buffer should be more than 32.  If it is `NULL', it is ignored.     the buffer should be more than 32.  If it is `NULL', it is not used.
354     `pp' specifies the pointer to a variable to which the port of the client is assigned.  If it     `pp' specifies the pointer to a variable to which the port of the client is assigned.  If it
355     is `NULL', it is ignored.     is `NULL', it is not used.
356     The return value is a socket connected to the client, or 0 if intterupted,  or -1 if failure.     The return value is a socket connected to the client, or 0 if intterupted,  or -1 if failure.
357     The thread blocks until the connection is established. */     The thread blocks until the connection is established. */
358  int est_accept_conn(int sock, char *abuf, int *pp);  int est_accept_conn(int sock, char *abuf, int *pp);
# Line 418  void est_datum_printf(CBDATUM *datum, co Line 420  void est_datum_printf(CBDATUM *datum, co
420     `outsec' specifies timeout in seconds.  If it is negative, it is not used.     `outsec' specifies timeout in seconds.  If it is negative, it is not used.
421     `auth' specifies an authority information in such form as "user:pass".  If it is `NULL', it is     `auth' specifies an authority information in such form as "user:pass".  If it is `NULL', it is
422     not used.     not used.
423     `reqheads' specifies a list object of extension headers.  If it is `NULL' it is ignored.     `reqheads' specifies a list object of extension headers.  If it is `NULL' it is not used.
424     `reqbody' specifies the pointer of the entitiy body of request.  If it is `NULL', "GET"     `reqbody' specifies the pointer of the entitiy body of request.  If it is `NULL', "GET"
425     method is used.     method is used.
426     `rbsiz' specifies the size of the entity body.     `rbsiz' specifies the size of the entity body.
# Line 428  void est_datum_printf(CBDATUM *datum, co Line 430  void est_datum_printf(CBDATUM *datum, co
430     header is recorded as an attribute whose name is converted from the header name into lower     header is recorded as an attribute whose name is converted from the header name into lower
431     cases.  The top header for the status code is recorded with the key of an empty string.  If it     cases.  The top header for the status code is recorded with the key of an empty string.  If it
432     is `NULL', it is not used.     is `NULL', it is not used.
433     `reqbody' specifies a datum object into which the entity body of response is stored.  If it is     `resbody' specifies a datum object into which the entity body of response is stored.  If it is
434     `NULL', it is not used.     `NULL', it is not used.
435     The return value is true if success, else it is false.     The return value is true if success, else it is false.
436     Headers of "Host", "Connection", "User-Agent", "Authorization", and "Content-Length" are sent     Headers of "Host", "Connection", "User-Agent", "Authorization", and "Content-Length" are sent

Legend:
Removed from v.2  
changed lines
  Added in v.10

  ViewVC Help
Powered by ViewVC 1.1.26