fix problem when finishing a chunked encoding stream
[m6w6/ext-http] / php_http_persistent_handle.h
1 /*
2 +--------------------------------------------------------------------+
3 | PECL :: http |
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted provided that the conditions mentioned |
7 | in the accompanying LICENSE file are met. |
8 +--------------------------------------------------------------------+
9 | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
10 +--------------------------------------------------------------------+
11 */
12
13 /* $Id: php_http_persistent_handle_api.h 292841 2009-12-31 08:48:57Z mike $ */
14
15 #ifndef PHP_HTTP_PERSISTENT_HANDLE_H
16 #define PHP_HTTP_PERSISTENT_HANDLE_H
17
18 typedef void *(*php_http_persistent_handle_ctor_t)(void);
19 typedef void (*php_http_persistent_handle_dtor_t)(void *handle);
20 typedef void *(*php_http_persistent_handle_copy_t)(void *handle);
21
22 struct php_http_persistent_handle_globals {
23 ulong limit;
24 struct {
25 ulong h;
26 char *s;
27 size_t l;
28 } ident;
29 };
30
31 PHP_MINIT_FUNCTION(http_persistent_handle);
32 PHP_MSHUTDOWN_FUNCTION(http_persistent_handle);
33
34 PHP_HTTP_API STATUS php_http_persistent_handle_provide(const char *name_str, size_t name_len, php_http_persistent_handle_ctor_t ctor, php_http_persistent_handle_dtor_t dtor, php_http_persistent_handle_copy_t copy);
35 PHP_HTTP_API void php_http_persistent_handle_cleanup(const char *name_str, size_t name_len, int current_ident_only TSRMLS_DC);
36 PHP_HTTP_API HashTable *php_http_persistent_handle_statall(HashTable *ht TSRMLS_DC);
37 PHP_HTTP_API STATUS php_http_persistent_handle_acquire(const char *name_str, size_t name_len, void **handle TSRMLS_DC);
38 PHP_HTTP_API STATUS php_http_persistent_handle_release(const char *name_str, size_t name_len, void **handle TSRMLS_DC);
39 PHP_HTTP_API STATUS php_http_persistent_handle_accrete(const char *name_str, size_t name_len, void *old_handle, void **new_handle TSRMLS_DC);
40
41 #endif /* PHP_HTTP_PERSISTENT_HANDLE_H */
42
43 /*
44 * Local variables:
45 * tab-width: 4
46 * c-basic-offset: 4
47 * End:
48 * vim600: noet sw=4 ts=4 fdm=marker
49 * vim<600: noet sw=4 ts=4
50 */