Transaction API for HTTP.
More...
#include <sofia-sip/su_wait.h>
#include <sofia-sip/su_tag.h>
#include <sofia-sip/http.h>
#include <sofia-sip/http_status.h>
#include <sofia-sip/nth_tag.h>
Go to the source code of this file.
Detailed Description
Transaction API for HTTP.
- Author:
- Pekka Pessi <Pekka.Pessi@nokia-email.address.hidden>.
- Date:
- Created: Wed Jun 5 19:25:18 2002 ppessi
Define Documentation
#define NTH_CLIENT_MAGIC_T |
Default type of application context for client NTH requests.
Application may define this to appropriate type before including <sofia-sip/nth.h>.
Default type of application context for NTH servers.
Application may define this to appropriate type before including <sofia-sip/nth.h>.
Function Documentation
Gets client method.
- Parameters:
-
| hc | pointer to a nth client object |
- Returns:
- Returns the HTTP method from the request. If hc is NULL, returns http_method_invalid.
Gets client status.
- Parameters:
-
| hc | pointer to a nth client object |
- Returns:
- Returns the status code from the response message if it has been received. A status code below 100 indicates that no response has been received. If request timeouts, the connection is closed and the status code is set to 408. If hc is NULL, returns 400 (Bad Request).
struct auth_status_t* nth_request_auth |
( |
nth_request_t const * |
req |
) |
[read] |
Return request authentication status.
- Parameters:
-
| req | pointer to HTTP request object |
- Return values:
-
| Pointer | to authentication status struct |
- Note:
- The authentication status struct is freed when the nth_request_t object is destroyed.
- Since:
- New in 1.12.4
- See also:
- AUTH
Return request authentication status.
- Parameters:
-
| req | pointer to HTTP request object |
- Return values:
-
- Since:
- New in 1.12.4
Get the time last time served.
- Since:
- New in 1.12.4.
Create a http site object.
The function nth_site_create() allocates and initializes a web site object. A web site object can be either
- a primary http server (parent is NULL),
- a virtual http server (address contains hostpart), or
- a site within a server (address does not have hostpart, only path part).
- Parameters:
-
| parent | pointer to parent site (NULL when creating a primary server object) |
| callback | pointer to callback function called when a request is received |
| magic | application context included in callback parameters |
| address | absolute or relative URI specifying the address of site |
| tag,value,... | list of tagged parameters |
- Related Tags:
- If the parent is NULL, the list of tagged parameters must contain NTHTAG_ROOT() used to create the server engine. Tags supported when parent is NULL are NTHTAG_ROOT(), NTHTAG_MCLASS(), TPTAG_REUSE(), HTTPTAG_SERVER(), and HTTPTAG_SERVER_STR(). All the tags are passed to tport_tcreate() and tport_tbind(), too.
- Since:
- Support for multiple sites was added to 1.12.4
Get the site URL.
- Since:
- New in 1.12.4.