diff options
author | Wez Furlong <wez@php.net> | 2002-04-30 00:16:00 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2002-04-30 00:16:00 +0000 |
commit | 37411dd67427babef896b10c55d8f92ff09c318c (patch) | |
tree | 3b3b27f9f9c6d2e3f97dc2a85c6d730e51a2784d /main/php_streams.h | |
parent | 94f9b3bdb5c5cf05656b63935ff0343cf9aebfb8 (diff) | |
download | php-git-37411dd67427babef896b10c55d8f92ff09c318c.tar.gz |
Implement context option setting API.
Add/amend debugging code for sockets.
Add a flag that will help the http wrapper optimize itself when
it is not being used for include/require.
Diffstat (limited to 'main/php_streams.h')
-rwxr-xr-x | main/php_streams.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/main/php_streams.h b/main/php_streams.h index af1bcefc23..815b0ea549 100755 --- a/main/php_streams.h +++ b/main/php_streams.h @@ -119,7 +119,7 @@ typedef struct _php_stream_notifier { struct _php_stream_context { php_stream_notifier *notifier; - + zval *options; /* hash keyed by wrapper family or specific wrapper */ }; typedef struct _php_stream_wrapper_options { @@ -352,6 +352,14 @@ PHPAPI int _php_stream_cast(php_stream *stream, int castas, void **ret, int show /* If you don't need to write to the stream, but really need to * be able to seek, use this flag in your options. */ #define STREAM_MUST_SEEK 16 +/* If you are going to end up casting the stream into a FILE* or + * a socket, pass this flag and the streams/wrappers will not use + * buffering mechanisms while reading the headers, so that HTTP + * wrapped streams will work consistently. + * If you omit this flag, streams will use buffering and should end + * up working more optimally. + * */ +#define STREAM_WILL_CAST 32 #ifdef PHP_WIN32 # define IGNORE_URL_WIN IGNORE_URL @@ -390,6 +398,10 @@ PHPAPI extern php_stream_ops php_stream_userspace_ops; PHPAPI void php_stream_context_free(php_stream_context *context); PHPAPI php_stream_context *php_stream_context_alloc(void); +PHPAPI int php_stream_context_get_option(php_stream_context *context, + const char *wrappername, const char *optionname, zval **optionvalue); +PHPAPI int php_stream_context_set_option(php_stream_context *context, + const char *wrappername, const char *optionname, zval *optionvalue); PHPAPI php_stream_notifier *php_stream_notification_alloc(void); PHPAPI void php_stream_notification_free(php_stream_notifier *notifier); |