Lines Matching refs:stream

95 	php_stream *stream = NULL;  in PHP_FUNCTION()  local
131 stream = php_stream_xport_create(host, host_len, ENFORCE_SAFE_MODE | REPORT_ERRORS, in PHP_FUNCTION()
137 if (stream == NULL) { in PHP_FUNCTION()
149 if (stream == NULL) { in PHP_FUNCTION()
168 php_stream_to_zval(stream, return_value); in PHP_FUNCTION()
180 php_stream *stream = NULL; in PHP_FUNCTION() local
207 stream = php_stream_xport_create(host, host_len, ENFORCE_SAFE_MODE | REPORT_ERRORS, in PHP_FUNCTION()
211 if (stream == NULL) { in PHP_FUNCTION()
215 if (stream == NULL) { in PHP_FUNCTION()
234 php_stream_to_zval(stream, return_value); in PHP_FUNCTION()
248 php_stream *stream = NULL, *clistream = NULL; in PHP_FUNCTION() local
257 php_stream_from_zval(stream, &zstream); in PHP_FUNCTION()
273 if (0 == php_stream_xport_accept(stream, &clistream, in PHP_FUNCTION()
299 php_stream *stream; in PHP_FUNCTION() local
309 php_stream_from_zval(stream, &zstream); in PHP_FUNCTION()
311 if (0 != php_stream_xport_get_name(stream, want_peer, in PHP_FUNCTION()
327 php_stream *stream; in PHP_FUNCTION() local
338 php_stream_from_zval(stream, &zstream); in PHP_FUNCTION()
348 …RETURN_LONG(php_stream_xport_sendto(stream, data, datalen, flags, target_addr ? &sa : NULL, sl TSR… in PHP_FUNCTION()
356 php_stream *stream; in PHP_FUNCTION() local
369 php_stream_from_zval(stream, &zstream); in PHP_FUNCTION()
383 recvd = php_stream_xport_recvfrom(stream, read_buf, to_read, flags, NULL, NULL, in PHP_FUNCTION()
412 php_stream *stream; in PHP_FUNCTION() local
424 php_stream_from_zval(stream, &zsrc); in PHP_FUNCTION()
430 position = php_stream_tell(stream); in PHP_FUNCTION()
433 seek_res = php_stream_seek(stream, desiredpos - position, SEEK_CUR); in PHP_FUNCTION()
436 seek_res = php_stream_seek(stream, desiredpos, SEEK_SET); in PHP_FUNCTION()
446 len = php_stream_copy_to_mem(stream, &contents, maxlen, 0); in PHP_FUNCTION()
496 php_stream *stream; in PHP_FUNCTION() local
502 php_stream_from_zval(stream, &arg1); in PHP_FUNCTION()
506 if (stream->wrapperdata) { in PHP_FUNCTION()
508 MAKE_COPY_ZVAL(&stream->wrapperdata, newval); in PHP_FUNCTION()
512 if (stream->wrapper) { in PHP_FUNCTION()
513 add_assoc_string(return_value, "wrapper_type", (char *)stream->wrapper->wops->label, 1); in PHP_FUNCTION()
515 add_assoc_string(return_value, "stream_type", (char *)stream->ops->label, 1); in PHP_FUNCTION()
517 add_assoc_string(return_value, "mode", stream->mode, 1); in PHP_FUNCTION()
520 if (stream->filterhead) { in PHP_FUNCTION()
526 for (filter = stream->filterhead; filter != NULL; filter = filter->next) { in PHP_FUNCTION()
534 add_assoc_long(return_value, "unread_bytes", stream->writepos - stream->readpos); in PHP_FUNCTION()
536 …add_assoc_bool(return_value, "seekable", (stream->ops->seek) && (stream->flags & PHP_STREAM_FLAG_N… in PHP_FUNCTION()
537 if (stream->orig_path) { in PHP_FUNCTION()
538 add_assoc_string(return_value, "uri", stream->orig_path, 1); in PHP_FUNCTION()
541 if (!php_stream_populate_meta_data(stream, return_value)) { in PHP_FUNCTION()
544 add_assoc_bool(return_value, "eof", php_stream_eof(stream)); in PHP_FUNCTION()
613 php_stream *stream; in stream_array_to_fd_set() local
628 php_stream_from_zval_no_verify(stream, elem); in stream_array_to_fd_set()
629 if (stream == NULL) { in stream_array_to_fd_set()
637 …if (SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL, (vo… in stream_array_to_fd_set()
655 php_stream *stream; in stream_array_from_fd_set() local
674 php_stream_from_zval_no_verify(stream, elem); in stream_array_from_fd_set()
675 if (stream == NULL) { in stream_array_from_fd_set()
683 …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
725 php_stream_from_zval_no_verify(stream, elem); in stream_array_emulate_read_fd_set()
726 if (stream == NULL) { in stream_array_emulate_read_fd_set()
729 if ((stream->writepos - stream->readpos) > 0) { in stream_array_emulate_read_fd_set()
984 php_stream *stream; in decode_context_param() local
986stream = zend_fetch_resource(&contextresource TSRMLS_CC, -1, NULL, NULL, 2, php_file_le_stream(), … in decode_context_param()
988 if (stream) { in decode_context_param()
989 context = stream->context; in decode_context_param()
995 context = stream->context = php_stream_context_alloc(); in decode_context_param()
1184 php_stream *stream; in apply_filter_to_stream() local
1197 php_stream_from_zval(stream, &zstream); in apply_filter_to_stream()
1205 if (strchr(stream->mode, 'r') || strchr(stream->mode, '+')) { in apply_filter_to_stream()
1208 if (strchr(stream->mode, 'w') || strchr(stream->mode, '+') || strchr(stream->mode, 'a')) { in apply_filter_to_stream()
1214 …filter = php_stream_filter_create(filtername, filterparams, php_stream_is_persistent(stream) TSRML… in apply_filter_to_stream()
1220 ret = php_stream_filter_append_ex(&stream->readfilters, filter TSRMLS_CC); in apply_filter_to_stream()
1222 ret = php_stream_filter_prepend_ex(&stream->readfilters, filter TSRMLS_CC); in apply_filter_to_stream()
1231 …filter = php_stream_filter_create(filtername, filterparams, php_stream_is_persistent(stream) TSRML… in apply_filter_to_stream()
1237 ret = php_stream_filter_append_ex(&stream->writefilters, filter TSRMLS_CC); in apply_filter_to_stream()
1239 ret = php_stream_filter_prepend_ex(&stream->writefilters, filter TSRMLS_CC); in apply_filter_to_stream()
1313 php_stream *stream; in PHP_FUNCTION() local
1327 php_stream_from_zval(stream, &zstream); in PHP_FUNCTION()
1329 if ((buf = php_stream_get_record(stream, max_length, &buf_size, str, str_len TSRMLS_CC))) { in PHP_FUNCTION()
1345 php_stream *stream; in PHP_FUNCTION() local
1351 php_stream_from_zval(stream, &arg1); in PHP_FUNCTION()
1355 if (php_stream_set_option(stream, PHP_STREAM_OPTION_BLOCKING, block == 0 ? 0 : 1, NULL) == -1) { in PHP_FUNCTION()
1372 php_stream *stream; in PHP_FUNCTION() local
1379 php_stream_from_zval(stream, &socket); in PHP_FUNCTION()
1390 …if (PHP_STREAM_OPTION_RETURN_OK == php_stream_set_option(stream, PHP_STREAM_OPTION_READ_TIMEOUT, 0… in PHP_FUNCTION()
1407 php_stream *stream; in PHP_FUNCTION() local
1413 php_stream_from_zval(stream, &arg1); in PHP_FUNCTION()
1419 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_WRITE_BUFFER, PHP_STREAM_BUFFER_NONE, NULL); in PHP_FUNCTION()
1421 …ret = php_stream_set_option(stream, PHP_STREAM_OPTION_WRITE_BUFFER, PHP_STREAM_BUFFER_FULL, &buff); in PHP_FUNCTION()
1436 php_stream *stream; in PHP_FUNCTION() local
1442 php_stream_from_zval(stream, &arg1); in PHP_FUNCTION()
1448 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_READ_BUFFER, PHP_STREAM_BUFFER_NONE, NULL); in PHP_FUNCTION()
1450 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_READ_BUFFER, PHP_STREAM_BUFFER_FULL, &buff); in PHP_FUNCTION()
1463 php_stream *stream, *sessstream = NULL; in PHP_FUNCTION() local
1471 php_stream_from_zval(stream, &zstream); in PHP_FUNCTION()
1478 if (php_stream_xport_crypto_setup(stream, cryptokind, sessstream TSRMLS_CC) < 0) { in PHP_FUNCTION()
1486 ret = php_stream_xport_crypto_enable(stream, enable TSRMLS_CC); in PHP_FUNCTION()
1525 php_stream *stream = NULL; in PHP_FUNCTION() local
1533 php_stream_from_zval(stream, zstream); in PHP_FUNCTION()
1534 if (stream == NULL) { in PHP_FUNCTION()
1537 wrapper = stream->wrapper; in PHP_FUNCTION()
1556 php_stream *stream; in PHP_FUNCTION() local
1563 php_stream_from_zval(stream, &zsrc); in PHP_FUNCTION()
1565 if (!php_stream_supports_lock(stream)) { in PHP_FUNCTION()
1583 php_stream *stream; in PHP_FUNCTION() local
1595 php_stream_from_zval(stream, &zstream); in PHP_FUNCTION()
1597 RETURN_BOOL(php_stream_xport_shutdown(stream, (stream_shutdown_t)how TSRMLS_CC) == 0); in PHP_FUNCTION()