Lines Matching refs:stream

40 …GET_CTX_OPT(stream, wrapper, name, val) (PHP_STREAM_CONTEXT(stream) && NULL != (val = php_stream_c…  argument
105 php_stream *stream = NULL; in PHP_FUNCTION() local
159 stream = php_stream_xport_create(ZSTR_VAL(host), ZSTR_LEN(host), REPORT_ERRORS, in PHP_FUNCTION()
165 if (stream == NULL) { in PHP_FUNCTION()
177 if (stream == NULL) { in PHP_FUNCTION()
193 php_stream_to_zval(stream, return_value); in PHP_FUNCTION()
204 php_stream *stream = NULL; in PHP_FUNCTION() local
230 stream = php_stream_xport_create(host, host_len, REPORT_ERRORS, in PHP_FUNCTION()
234 if (stream == NULL) { in PHP_FUNCTION()
238 if (stream == NULL) { in PHP_FUNCTION()
254 php_stream_to_zval(stream, return_value); in PHP_FUNCTION()
267 php_stream *stream = NULL, *clistream = NULL; in PHP_FUNCTION() local
285 php_stream_from_zval(stream, zstream); in PHP_FUNCTION()
303 if (0 == php_stream_xport_accept(stream, &clistream, in PHP_FUNCTION()
330 php_stream *stream; in PHP_FUNCTION() local
340 php_stream_from_zval(stream, zstream); in PHP_FUNCTION()
342 if (0 != php_stream_xport_get_name(stream, want_peer, in PHP_FUNCTION()
361 php_stream *stream; in PHP_FUNCTION() local
376 php_stream_from_zval(stream, zstream); in PHP_FUNCTION()
386 …RETURN_LONG(php_stream_xport_sendto(stream, data, datalen, (int)flags, target_addr_len ? &sa : NUL… in PHP_FUNCTION()
393 php_stream *stream; in PHP_FUNCTION() local
409 php_stream_from_zval(stream, zstream); in PHP_FUNCTION()
422 recvd = php_stream_xport_recvfrom(stream, ZSTR_VAL(read_buf), to_read, (int)flags, NULL, NULL, in PHP_FUNCTION()
443 php_stream *stream; in PHP_FUNCTION() local
463 php_stream_from_zval(stream, zsrc); in PHP_FUNCTION()
469 position = php_stream_tell(stream); in PHP_FUNCTION()
472 seek_res = php_stream_seek(stream, desiredpos - position, SEEK_CUR); in PHP_FUNCTION()
475 seek_res = php_stream_seek(stream, desiredpos, SEEK_SET); in PHP_FUNCTION()
485 if ((contents = php_stream_copy_to_mem(stream, maxlen, 0))) { in PHP_FUNCTION()
536 php_stream *stream; in PHP_FUNCTION() local
542 php_stream_from_zval(stream, zstream); in PHP_FUNCTION()
546 if (!php_stream_populate_meta_data(stream, return_value)) { in PHP_FUNCTION()
549 add_assoc_bool(return_value, "eof", php_stream_eof(stream)); in PHP_FUNCTION()
552 if (!Z_ISUNDEF(stream->wrapperdata)) { in PHP_FUNCTION()
553 Z_ADDREF_P(&stream->wrapperdata); in PHP_FUNCTION()
554 add_assoc_zval(return_value, "wrapper_data", &stream->wrapperdata); in PHP_FUNCTION()
556 if (stream->wrapper) { in PHP_FUNCTION()
557 add_assoc_string(return_value, "wrapper_type", (char *)stream->wrapper->wops->label); in PHP_FUNCTION()
559 add_assoc_string(return_value, "stream_type", (char *)stream->ops->label); in PHP_FUNCTION()
561 add_assoc_string(return_value, "mode", stream->mode); in PHP_FUNCTION()
564 if (stream->filterhead) { in PHP_FUNCTION()
570 for (filter = stream->filterhead; filter != NULL; filter = filter->next) { in PHP_FUNCTION()
578 add_assoc_long(return_value, "unread_bytes", stream->writepos - stream->readpos); in PHP_FUNCTION()
580 …add_assoc_bool(return_value, "seekable", (stream->ops->seek) && (stream->flags & PHP_STREAM_FLAG_N… in PHP_FUNCTION()
581 if (stream->orig_path) { in PHP_FUNCTION()
582 add_assoc_string(return_value, "uri", stream->orig_path); in PHP_FUNCTION()
627 php_stream *stream; in stream_array_to_fd_set() local
641 php_stream_from_zval_no_verify(stream, elem); in stream_array_to_fd_set()
642 if (stream == NULL) { in stream_array_to_fd_set()
650 …if (SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL, (vo… in stream_array_to_fd_set()
667 php_stream *stream; in stream_array_from_fd_set() local
681 php_stream_from_zval_no_verify(stream, elem); in stream_array_from_fd_set()
682 if (stream == NULL) { in stream_array_from_fd_set()
690 …if (SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL, (vo… in stream_array_from_fd_set()
716 php_stream *stream; in stream_array_emulate_read_fd_set() local
728 php_stream_from_zval_no_verify(stream, elem); in stream_array_emulate_read_fd_set()
729 if (stream == NULL) { in stream_array_emulate_read_fd_set()
732 if ((stream->writepos - stream->readpos) > 0) { in stream_array_emulate_read_fd_set()
973 php_stream *stream; in decode_context_param() local
975stream = zend_fetch_resource2_ex(contextresource, NULL, php_file_le_stream(), php_file_le_pstream(… in decode_context_param()
977 if (stream) { in decode_context_param()
978 context = PHP_STREAM_CONTEXT(stream); in decode_context_param()
985 stream->ctx = context->res; in decode_context_param()
1239 php_stream *stream; in apply_filter_to_stream() local
1255 php_stream_from_zval(stream, zstream); in apply_filter_to_stream()
1263 if (strchr(stream->mode, 'r') || strchr(stream->mode, '+')) { in apply_filter_to_stream()
1266 if (strchr(stream->mode, 'w') || strchr(stream->mode, '+') || strchr(stream->mode, 'a')) { in apply_filter_to_stream()
1272 filter = php_stream_filter_create(filtername, filterparams, php_stream_is_persistent(stream)); in apply_filter_to_stream()
1278 ret = php_stream_filter_append_ex(&stream->readfilters, filter); in apply_filter_to_stream()
1280 ret = php_stream_filter_prepend_ex(&stream->readfilters, filter); in apply_filter_to_stream()
1289 filter = php_stream_filter_create(filtername, filterparams, php_stream_is_persistent(stream)); in apply_filter_to_stream()
1295 ret = php_stream_filter_append_ex(&stream->writefilters, filter); in apply_filter_to_stream()
1297 ret = php_stream_filter_prepend_ex(&stream->writefilters, filter); in apply_filter_to_stream()
1363 php_stream *stream; in PHP_FUNCTION() local
1380 php_stream_from_zval(stream, zstream); in PHP_FUNCTION()
1382 if ((buf = php_stream_get_record(stream, max_length, str, str_len))) { in PHP_FUNCTION()
1396 php_stream *stream; in PHP_FUNCTION() local
1403 php_stream_from_zval(stream, zstream); in PHP_FUNCTION()
1405 if (php_stream_set_option(stream, PHP_STREAM_OPTION_BLOCKING, block, NULL) == -1) { in PHP_FUNCTION()
1421 php_stream *stream; in PHP_FUNCTION() local
1431 php_stream_from_zval(stream, socket); in PHP_FUNCTION()
1453 …if (PHP_STREAM_OPTION_RETURN_OK == php_stream_set_option(stream, PHP_STREAM_OPTION_READ_TIMEOUT, 0… in PHP_FUNCTION()
1469 php_stream *stream; in PHP_FUNCTION() local
1476 php_stream_from_zval(stream, arg1); in PHP_FUNCTION()
1482 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_WRITE_BUFFER, PHP_STREAM_BUFFER_NONE, NULL); in PHP_FUNCTION()
1484 …ret = php_stream_set_option(stream, PHP_STREAM_OPTION_WRITE_BUFFER, PHP_STREAM_BUFFER_FULL, &buff); in PHP_FUNCTION()
1497 php_stream *stream; in PHP_FUNCTION() local
1517 php_stream_from_zval(stream, zstream); in PHP_FUNCTION()
1519 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_SET_CHUNK_SIZE, (int)csize, NULL); in PHP_FUNCTION()
1532 php_stream *stream; in PHP_FUNCTION() local
1539 php_stream_from_zval(stream, arg1); in PHP_FUNCTION()
1545 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_READ_BUFFER, PHP_STREAM_BUFFER_NONE, NULL); in PHP_FUNCTION()
1547 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_READ_BUFFER, PHP_STREAM_BUFFER_FULL, &buff); in PHP_FUNCTION()
1559 php_stream *stream, *sessstream = NULL; in PHP_FUNCTION() local
1571 php_stream_from_zval(stream, zstream); in PHP_FUNCTION()
1577 if (!GET_CTX_OPT(stream, "ssl", "crypto_method", val)) { in PHP_FUNCTION()
1589 if (php_stream_xport_crypto_setup(stream, cryptokind, sessstream) < 0) { in PHP_FUNCTION()
1594 ret = php_stream_xport_crypto_enable(stream, enable); in PHP_FUNCTION()
1631 php_stream *stream = NULL; in PHP_FUNCTION() local
1639 php_stream_from_zval(stream, zstream); in PHP_FUNCTION()
1640 wrapper = stream->wrapper; in PHP_FUNCTION()
1660 php_stream *stream; in PHP_FUNCTION() local
1667 php_stream_from_zval(stream, zsrc); in PHP_FUNCTION()
1669 if (!php_stream_supports_lock(stream)) { in PHP_FUNCTION()
1680 php_stream *stream; in PHP_FUNCTION() local
1687 php_stream_from_zval(stream, zsrc); in PHP_FUNCTION()
1693 …if (php_stream_can_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL) == SUCCESS… in PHP_FUNCTION()
1694 …php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL, (void*)&fileno, 0); in PHP_FUNCTION()
1695 } else if (php_stream_can_cast(stream, PHP_STREAM_AS_FD | PHP_STREAM_CAST_INTERNAL) == SUCCESS) { in PHP_FUNCTION()
1696 php_stream_cast(stream, PHP_STREAM_AS_FD | PHP_STREAM_CAST_INTERNAL, (void*)&fileno, 0); in PHP_FUNCTION()
1722 php_stream *stream; in PHP_FUNCTION() local
1732 php_stream_from_zval(stream, zsrc); in PHP_FUNCTION()
1738 …if (php_stream_can_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL) == SUCCESS… in PHP_FUNCTION()
1739 …php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL, (void*)&fileno, 0); in PHP_FUNCTION()
1740 } else if (php_stream_can_cast(stream, PHP_STREAM_AS_FD | PHP_STREAM_CAST_INTERNAL) == SUCCESS) { in PHP_FUNCTION()
1741 php_stream_cast(stream, PHP_STREAM_AS_FD | PHP_STREAM_CAST_INTERNAL, (void*)&fileno, 0); in PHP_FUNCTION()
1789 php_stream *stream; in PHP_FUNCTION() local
1803 php_stream_from_zval(stream, zstream); in PHP_FUNCTION()
1805 RETURN_BOOL(php_stream_xport_shutdown(stream, (stream_shutdown_t)how) == 0); in PHP_FUNCTION()