Lines Matching refs:stream

47 …GET_CTX_OPT(stream, wrapper, name, val) (PHP_STREAM_CONTEXT(stream) && NULL != (val = php_stream_c…  argument
101 php_stream *stream = NULL; in PHP_FUNCTION() local
143 stream = php_stream_xport_create(ZSTR_VAL(host), ZSTR_LEN(host), REPORT_ERRORS, in PHP_FUNCTION()
149 if (stream == NULL) { in PHP_FUNCTION()
161 if (stream == NULL) { in PHP_FUNCTION()
179 php_stream_to_zval(stream, return_value); in PHP_FUNCTION()
191 php_stream *stream = NULL; in PHP_FUNCTION() local
223 stream = php_stream_xport_create(host, host_len, REPORT_ERRORS, in PHP_FUNCTION()
227 if (stream == NULL) { in PHP_FUNCTION()
231 if (stream == NULL) { in PHP_FUNCTION()
249 php_stream_to_zval(stream, return_value); in PHP_FUNCTION()
262 php_stream *stream = NULL, *clistream = NULL; in PHP_FUNCTION() local
273 php_stream_from_zval(stream, zstream); in PHP_FUNCTION()
289 if (0 == php_stream_xport_accept(stream, &clistream, in PHP_FUNCTION()
314 php_stream *stream; in PHP_FUNCTION() local
324 php_stream_from_zval(stream, zstream); in PHP_FUNCTION()
326 if (0 != php_stream_xport_get_name(stream, want_peer, in PHP_FUNCTION()
346 php_stream *stream; in PHP_FUNCTION() local
361 php_stream_from_zval(stream, zstream); in PHP_FUNCTION()
371 …RETURN_LONG(php_stream_xport_sendto(stream, data, datalen, (int)flags, target_addr ? &sa : NULL, s… in PHP_FUNCTION()
379 php_stream *stream; in PHP_FUNCTION() local
395 php_stream_from_zval(stream, zstream); in PHP_FUNCTION()
409 recvd = php_stream_xport_recvfrom(stream, ZSTR_VAL(read_buf), to_read, (int)flags, NULL, NULL, in PHP_FUNCTION()
431 php_stream *stream; in PHP_FUNCTION() local
444 php_stream_from_zval(stream, zsrc); in PHP_FUNCTION()
450 position = php_stream_tell(stream); in PHP_FUNCTION()
453 seek_res = php_stream_seek(stream, desiredpos - position, SEEK_CUR); in PHP_FUNCTION()
456 seek_res = php_stream_seek(stream, desiredpos, SEEK_SET); in PHP_FUNCTION()
470 if ((contents = php_stream_copy_to_mem(stream, maxlen, 0))) { in PHP_FUNCTION()
518 php_stream *stream; in PHP_FUNCTION() local
524 php_stream_from_zval(stream, zstream); in PHP_FUNCTION()
528 if (!php_stream_populate_meta_data(stream, return_value)) { in PHP_FUNCTION()
531 add_assoc_bool(return_value, "eof", php_stream_eof(stream)); in PHP_FUNCTION()
534 if (!Z_ISUNDEF(stream->wrapperdata)) { in PHP_FUNCTION()
535 Z_ADDREF_P(&stream->wrapperdata); in PHP_FUNCTION()
536 add_assoc_zval(return_value, "wrapper_data", &stream->wrapperdata); in PHP_FUNCTION()
538 if (stream->wrapper) { in PHP_FUNCTION()
539 add_assoc_string(return_value, "wrapper_type", (char *)stream->wrapper->wops->label); in PHP_FUNCTION()
541 add_assoc_string(return_value, "stream_type", (char *)stream->ops->label); in PHP_FUNCTION()
543 add_assoc_string(return_value, "mode", stream->mode); in PHP_FUNCTION()
546 if (stream->filterhead) { in PHP_FUNCTION()
552 for (filter = stream->filterhead; filter != NULL; filter = filter->next) { in PHP_FUNCTION()
560 add_assoc_long(return_value, "unread_bytes", stream->writepos - stream->readpos); in PHP_FUNCTION()
562 …add_assoc_bool(return_value, "seekable", (stream->ops->seek) && (stream->flags & PHP_STREAM_FLAG_N… in PHP_FUNCTION()
563 if (stream->orig_path) { in PHP_FUNCTION()
564 add_assoc_string(return_value, "uri", stream->orig_path); in PHP_FUNCTION()
621 php_stream *stream; in stream_array_to_fd_set() local
635 php_stream_from_zval_no_verify(stream, elem); in stream_array_to_fd_set()
636 if (stream == NULL) { in stream_array_to_fd_set()
644 …if (SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL, (vo… in stream_array_to_fd_set()
660 php_stream *stream; in stream_array_from_fd_set() local
675 php_stream_from_zval_no_verify(stream, elem); in stream_array_from_fd_set()
676 if (stream == NULL) { in stream_array_from_fd_set()
684 …if (SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL, (vo… in stream_array_from_fd_set()
711 php_stream *stream; in stream_array_emulate_read_fd_set() local
724 php_stream_from_zval_no_verify(stream, elem); in stream_array_emulate_read_fd_set()
725 if (stream == NULL) { in stream_array_emulate_read_fd_set()
728 if ((stream->writepos - stream->readpos) > 0) { in stream_array_emulate_read_fd_set()
956 php_stream *stream; in decode_context_param() local
958stream = zend_fetch_resource2_ex(contextresource, NULL, php_file_le_stream(), php_file_le_pstream(… in decode_context_param()
960 if (stream) { in decode_context_param()
961 context = PHP_STREAM_CONTEXT(stream); in decode_context_param()
968 stream->ctx = context->res; in decode_context_param()
1170 php_stream *stream; in apply_filter_to_stream() local
1186 php_stream_from_zval(stream, zstream); in apply_filter_to_stream()
1194 if (strchr(stream->mode, 'r') || strchr(stream->mode, '+')) { in apply_filter_to_stream()
1197 if (strchr(stream->mode, 'w') || strchr(stream->mode, '+') || strchr(stream->mode, 'a')) { in apply_filter_to_stream()
1203 filter = php_stream_filter_create(filtername, filterparams, php_stream_is_persistent(stream)); in apply_filter_to_stream()
1209 ret = php_stream_filter_append_ex(&stream->readfilters, filter); in apply_filter_to_stream()
1211 ret = php_stream_filter_prepend_ex(&stream->readfilters, filter); in apply_filter_to_stream()
1220 filter = php_stream_filter_create(filtername, filterparams, php_stream_is_persistent(stream)); in apply_filter_to_stream()
1226 ret = php_stream_filter_append_ex(&stream->writefilters, filter); in apply_filter_to_stream()
1228 ret = php_stream_filter_prepend_ex(&stream->writefilters, filter); in apply_filter_to_stream()
1303 php_stream *stream; in PHP_FUNCTION() local
1320 php_stream_from_zval(stream, zstream); in PHP_FUNCTION()
1322 if ((buf = php_stream_get_record(stream, max_length, str, str_len))) { in PHP_FUNCTION()
1337 php_stream *stream; in PHP_FUNCTION() local
1344 php_stream_from_zval(stream, zstream); in PHP_FUNCTION()
1346 if (php_stream_set_option(stream, PHP_STREAM_OPTION_BLOCKING, block, NULL) == -1) { in PHP_FUNCTION()
1363 php_stream *stream; in PHP_FUNCTION() local
1373 php_stream_from_zval(stream, socket); in PHP_FUNCTION()
1395 …if (PHP_STREAM_OPTION_RETURN_OK == php_stream_set_option(stream, PHP_STREAM_OPTION_READ_TIMEOUT, 0… in PHP_FUNCTION()
1412 php_stream *stream; in PHP_FUNCTION() local
1419 php_stream_from_zval(stream, arg1); in PHP_FUNCTION()
1425 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_WRITE_BUFFER, PHP_STREAM_BUFFER_NONE, NULL); in PHP_FUNCTION()
1427 …ret = php_stream_set_option(stream, PHP_STREAM_OPTION_WRITE_BUFFER, PHP_STREAM_BUFFER_FULL, &buff); in PHP_FUNCTION()
1441 php_stream *stream; in PHP_FUNCTION() local
1461 php_stream_from_zval(stream, zstream); in PHP_FUNCTION()
1463 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_SET_CHUNK_SIZE, (int)csize, NULL); in PHP_FUNCTION()
1477 php_stream *stream; in PHP_FUNCTION() local
1484 php_stream_from_zval(stream, arg1); in PHP_FUNCTION()
1490 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_READ_BUFFER, PHP_STREAM_BUFFER_NONE, NULL); in PHP_FUNCTION()
1492 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_READ_BUFFER, PHP_STREAM_BUFFER_FULL, &buff); in PHP_FUNCTION()
1505 php_stream *stream, *sessstream = NULL; in PHP_FUNCTION() local
1517 php_stream_from_zval(stream, zstream); in PHP_FUNCTION()
1523 if (!GET_CTX_OPT(stream, "ssl", "crypto_method", val)) { in PHP_FUNCTION()
1535 if (php_stream_xport_crypto_setup(stream, cryptokind, sessstream) < 0) { in PHP_FUNCTION()
1540 ret = php_stream_xport_crypto_enable(stream, enable); in PHP_FUNCTION()
1580 php_stream *stream = NULL; in PHP_FUNCTION() local
1588 php_stream_from_zval(stream, zstream); in PHP_FUNCTION()
1589 if (stream == NULL) { in PHP_FUNCTION()
1592 wrapper = stream->wrapper; in PHP_FUNCTION()
1611 php_stream *stream; in PHP_FUNCTION() local
1618 php_stream_from_zval(stream, zsrc); in PHP_FUNCTION()
1620 if (!php_stream_supports_lock(stream)) { in PHP_FUNCTION()
1633 php_stream *stream; in PHP_FUNCTION() local
1640 php_stream_from_zval(stream, zsrc); in PHP_FUNCTION()
1642 if (php_stream_can_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT) == SUCCESS) { in PHP_FUNCTION()
1643 php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT, (void*)&fileno, 0); in PHP_FUNCTION()
1644 } else if (php_stream_can_cast(stream, PHP_STREAM_AS_FD) == SUCCESS) { in PHP_FUNCTION()
1645 php_stream_cast(stream, PHP_STREAM_AS_FD, (void*)&fileno, 0); in PHP_FUNCTION()
1672 php_stream *stream; in PHP_FUNCTION() local
1684 php_stream_from_zval(stream, zsrc); in PHP_FUNCTION()
1686 if (php_stream_can_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT) == SUCCESS) { in PHP_FUNCTION()
1687 php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT, (void*)&fileno, 0); in PHP_FUNCTION()
1689 else if (php_stream_can_cast(stream, PHP_STREAM_AS_FD) == SUCCESS) { in PHP_FUNCTION()
1690 php_stream_cast(stream, PHP_STREAM_AS_FD, (void*)&fileno, 0); in PHP_FUNCTION()
1738 php_stream *stream; in PHP_FUNCTION() local
1752 php_stream_from_zval(stream, zstream); in PHP_FUNCTION()
1754 RETURN_BOOL(php_stream_xport_shutdown(stream, (stream_shutdown_t)how) == 0); in PHP_FUNCTION()