Lines Matching refs:stream
60 php_stream *stream = NULL; in _php_stream_xport_create() local
77 switch(php_stream_from_persistent_id(persistent_id, &stream)) { in _php_stream_xport_create()
81 …if (PHP_STREAM_OPTION_RETURN_OK == php_stream_set_option(stream, PHP_STREAM_OPTION_CHECK_LIVENESS,… in _php_stream_xport_create()
82 return stream; in _php_stream_xport_create()
85 php_stream_pclose(stream); in _php_stream_xport_create()
86 stream = NULL; in _php_stream_xport_create()
131 stream = (factory)(protocol, n, in _php_stream_xport_create()
135 if (stream) { in _php_stream_xport_create()
137 php_stream_context_set(stream, context); in _php_stream_xport_create()
143 if (-1 == php_stream_xport_connect(stream, name, namelen, in _php_stream_xport_create()
156 if (0 != php_stream_xport_bind(stream, name, namelen, &error_text)) { in _php_stream_xport_create()
163 …if (PHP_STREAM_CONTEXT(stream) && (zbacklog = php_stream_context_get_option(PHP_STREAM_CONTEXT(str… in _php_stream_xport_create()
167 if (0 != php_stream_xport_listen(stream, backlog, &error_text)) { in _php_stream_xport_create()
182 php_stream_pclose(stream); in _php_stream_xport_create()
184 php_stream_close(stream); in _php_stream_xport_create()
186 stream = NULL; in _php_stream_xport_create()
192 return stream; in _php_stream_xport_create()
196 PHPAPI int php_stream_xport_bind(php_stream *stream, in php_stream_xport_bind() argument
210 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_XPORT_API, 0, ¶m); in php_stream_xport_bind()
224 PHPAPI int php_stream_xport_connect(php_stream *stream, in php_stream_xport_connect() argument
243 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_XPORT_API, 0, ¶m); in php_stream_xport_connect()
260 PHPAPI int php_stream_xport_listen(php_stream *stream, int backlog, zend_string **error_text) in php_stream_xport_listen() argument
270 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_XPORT_API, 0, ¶m); in php_stream_xport_listen()
284 PHPAPI int php_stream_xport_accept(php_stream *stream, php_stream **client, in php_stream_xport_accept() argument
302 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_XPORT_API, 0, ¶m); in php_stream_xport_accept()
322 PHPAPI int php_stream_xport_get_name(php_stream *stream, int want_peer, in php_stream_xport_get_name() argument
336 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_XPORT_API, 0, ¶m); in php_stream_xport_get_name()
352 PHPAPI int php_stream_xport_crypto_setup(php_stream *stream, php_stream_xport_crypt_method_t crypto… in php_stream_xport_crypto_setup() argument
362 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_CRYPTO_API, 0, ¶m); in php_stream_xport_crypto_setup()
373 PHPAPI int php_stream_xport_crypto_enable(php_stream *stream, int activate) in php_stream_xport_crypto_enable() argument
382 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_CRYPTO_API, 0, ¶m); in php_stream_xport_crypto_enable()
395 PHPAPI int php_stream_xport_recvfrom(php_stream *stream, char *buf, size_t buflen, in php_stream_xport_recvfrom() argument
406 return php_stream_read(stream, buf, buflen); in php_stream_xport_recvfrom()
409 if (stream->readfilters.head) { in php_stream_xport_recvfrom()
420 recvd_len = stream->writepos - stream->readpos; in php_stream_xport_recvfrom()
425 memcpy(buf, stream->readbuf, recvd_len); in php_stream_xport_recvfrom()
447 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_XPORT_API, 0, ¶m); in php_stream_xport_recvfrom()
464 PHPAPI int php_stream_xport_sendto(php_stream *stream, const char *buf, size_t buflen, in php_stream_xport_sendto() argument
473 return php_stream_write(stream, buf, buflen); in php_stream_xport_sendto()
479 if ((oob || addr) && stream->writefilters.head) { in php_stream_xport_sendto()
494 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_XPORT_API, 0, ¶m); in php_stream_xport_sendto()
504 PHPAPI int php_stream_xport_shutdown(php_stream *stream, stream_shutdown_t how) in php_stream_xport_shutdown() argument
514 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_XPORT_API, 0, ¶m); in php_stream_xport_shutdown()