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()
132 stream = (factory)(protocol, n, in _php_stream_xport_create()
136 if (stream) { in _php_stream_xport_create()
138 php_stream_context_set(stream, context); in _php_stream_xport_create()
139 stream->orig_path = pestrdup(orig_path, persistent_id ? 1 : 0); in _php_stream_xport_create()
145 if (-1 == php_stream_xport_connect(stream, name, namelen, in _php_stream_xport_create()
158 if (0 != php_stream_xport_bind(stream, name, namelen, &error_text)) { in _php_stream_xport_create()
165 …if (PHP_STREAM_CONTEXT(stream) && (zbacklog = php_stream_context_get_option(PHP_STREAM_CONTEXT(str… in _php_stream_xport_create()
169 if (0 != php_stream_xport_listen(stream, backlog, &error_text)) { in _php_stream_xport_create()
175 stream->flags |= PHP_STREAM_FLAG_NO_IO; in _php_stream_xport_create()
187 php_stream_pclose(stream); in _php_stream_xport_create()
189 php_stream_close(stream); in _php_stream_xport_create()
191 stream = NULL; in _php_stream_xport_create()
197 return stream; in _php_stream_xport_create()
201 PHPAPI int php_stream_xport_bind(php_stream *stream, in php_stream_xport_bind() argument
215 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_XPORT_API, 0, ¶m); in php_stream_xport_bind()
229 PHPAPI int php_stream_xport_connect(php_stream *stream, in php_stream_xport_connect() argument
248 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_XPORT_API, 0, ¶m); in php_stream_xport_connect()
265 PHPAPI int php_stream_xport_listen(php_stream *stream, int backlog, zend_string **error_text) in php_stream_xport_listen() argument
275 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_XPORT_API, 0, ¶m); in php_stream_xport_listen()
289 PHPAPI int php_stream_xport_accept(php_stream *stream, php_stream **client, in php_stream_xport_accept() argument
307 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_XPORT_API, 0, ¶m); in php_stream_xport_accept()
327 PHPAPI int php_stream_xport_get_name(php_stream *stream, int want_peer, in php_stream_xport_get_name() argument
341 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_XPORT_API, 0, ¶m); in php_stream_xport_get_name()
357 PHPAPI int php_stream_xport_crypto_setup(php_stream *stream, php_stream_xport_crypt_method_t crypto… in php_stream_xport_crypto_setup() argument
367 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_CRYPTO_API, 0, ¶m); in php_stream_xport_crypto_setup()
378 PHPAPI int php_stream_xport_crypto_enable(php_stream *stream, int activate) in php_stream_xport_crypto_enable() argument
387 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_CRYPTO_API, 0, ¶m); in php_stream_xport_crypto_enable()
400 PHPAPI int php_stream_xport_recvfrom(php_stream *stream, char *buf, size_t buflen, in php_stream_xport_recvfrom() argument
411 return php_stream_read(stream, buf, buflen); in php_stream_xport_recvfrom()
414 if (stream->readfilters.head) { in php_stream_xport_recvfrom()
425 recvd_len = stream->writepos - stream->readpos; in php_stream_xport_recvfrom()
430 memcpy(buf, stream->readbuf, recvd_len); in php_stream_xport_recvfrom()
452 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_XPORT_API, 0, ¶m); in php_stream_xport_recvfrom()
469 PHPAPI int php_stream_xport_sendto(php_stream *stream, const char *buf, size_t buflen, in php_stream_xport_sendto() argument
478 return php_stream_write(stream, buf, buflen); in php_stream_xport_sendto()
484 if ((oob || addr) && stream->writefilters.head) { in php_stream_xport_sendto()
499 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_XPORT_API, 0, ¶m); in php_stream_xport_sendto()
509 PHPAPI int php_stream_xport_shutdown(php_stream *stream, stream_shutdown_t how) in php_stream_xport_shutdown() argument
519 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_XPORT_API, 0, ¶m); in php_stream_xport_shutdown()