Lines Matching refs:stream

95 	php_stream *stream = NULL;  in PHP_FUNCTION()  local
131 stream = php_stream_xport_create(host, host_len, 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, 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()
406 php_stream *stream; in PHP_FUNCTION() local
417 php_stream_from_zval(stream, &zsrc); in PHP_FUNCTION()
423 position = php_stream_tell(stream); in PHP_FUNCTION()
426 seek_res = php_stream_seek(stream, desiredpos - position, SEEK_CUR); in PHP_FUNCTION()
429 seek_res = php_stream_seek(stream, desiredpos, SEEK_SET); in PHP_FUNCTION()
439 len = php_stream_copy_to_mem(stream, &contents, maxlen, 0); in PHP_FUNCTION()
489 php_stream *stream; in PHP_FUNCTION() local
495 php_stream_from_zval(stream, &arg1); in PHP_FUNCTION()
499 if (!php_stream_populate_meta_data(stream, return_value)) { in PHP_FUNCTION()
502 add_assoc_bool(return_value, "eof", php_stream_eof(stream)); in PHP_FUNCTION()
505 if (stream->wrapperdata) { in PHP_FUNCTION()
507 MAKE_COPY_ZVAL(&stream->wrapperdata, newval); in PHP_FUNCTION()
511 if (stream->wrapper) { in PHP_FUNCTION()
512 add_assoc_string(return_value, "wrapper_type", (char *)stream->wrapper->wops->label, 1); in PHP_FUNCTION()
514 add_assoc_string(return_value, "stream_type", (char *)stream->ops->label, 1); in PHP_FUNCTION()
516 add_assoc_string(return_value, "mode", stream->mode, 1); in PHP_FUNCTION()
519 if (stream->filterhead) { in PHP_FUNCTION()
525 for (filter = stream->filterhead; filter != NULL; filter = filter->next) { in PHP_FUNCTION()
533 add_assoc_long(return_value, "unread_bytes", stream->writepos - stream->readpos); in PHP_FUNCTION()
535 …add_assoc_bool(return_value, "seekable", (stream->ops->seek) && (stream->flags & PHP_STREAM_FLAG_N… in PHP_FUNCTION()
536 if (stream->orig_path) { in PHP_FUNCTION()
537 add_assoc_string(return_value, "uri", stream->orig_path, 1); in PHP_FUNCTION()
607 php_stream *stream; in stream_array_to_fd_set() local
622 php_stream_from_zval_no_verify(stream, elem); in stream_array_to_fd_set()
623 if (stream == NULL) { in stream_array_to_fd_set()
631 …if (SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL, (vo… in stream_array_to_fd_set()
649 php_stream *stream; in stream_array_from_fd_set() local
680 php_stream_from_zval_no_verify(stream, elem); in stream_array_from_fd_set()
681 if (stream == NULL) { in stream_array_from_fd_set()
689 …if (SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL, (vo… in stream_array_from_fd_set()
722 php_stream *stream; in stream_array_emulate_read_fd_set() local
736 php_stream_from_zval_no_verify(stream, elem); in stream_array_emulate_read_fd_set()
737 if (stream == NULL) { in stream_array_emulate_read_fd_set()
740 if ((stream->writepos - stream->readpos) > 0) { in stream_array_emulate_read_fd_set()
995 php_stream *stream; in decode_context_param() local
997stream = zend_fetch_resource(&contextresource TSRMLS_CC, -1, NULL, NULL, 2, php_file_le_stream(), … in decode_context_param()
999 if (stream) { in decode_context_param()
1000 context = stream->context; in decode_context_param()
1006 context = stream->context = php_stream_context_alloc(TSRMLS_C); in decode_context_param()
1195 php_stream *stream; in apply_filter_to_stream() local
1208 php_stream_from_zval(stream, &zstream); in apply_filter_to_stream()
1216 if (strchr(stream->mode, 'r') || strchr(stream->mode, '+')) { in apply_filter_to_stream()
1219 if (strchr(stream->mode, 'w') || strchr(stream->mode, '+') || strchr(stream->mode, 'a')) { in apply_filter_to_stream()
1225 …filter = php_stream_filter_create(filtername, filterparams, php_stream_is_persistent(stream) TSRML… in apply_filter_to_stream()
1231 ret = php_stream_filter_append_ex(&stream->readfilters, filter TSRMLS_CC); in apply_filter_to_stream()
1233 ret = php_stream_filter_prepend_ex(&stream->readfilters, filter TSRMLS_CC); in apply_filter_to_stream()
1242 …filter = php_stream_filter_create(filtername, filterparams, php_stream_is_persistent(stream) TSRML… in apply_filter_to_stream()
1248 ret = php_stream_filter_append_ex(&stream->writefilters, filter TSRMLS_CC); in apply_filter_to_stream()
1250 ret = php_stream_filter_prepend_ex(&stream->writefilters, filter TSRMLS_CC); in apply_filter_to_stream()
1324 php_stream *stream; in PHP_FUNCTION() local
1338 php_stream_from_zval(stream, &zstream); in PHP_FUNCTION()
1340 if ((buf = php_stream_get_record(stream, max_length, &buf_size, str, str_len TSRMLS_CC))) { in PHP_FUNCTION()
1356 php_stream *stream; in PHP_FUNCTION() local
1362 php_stream_from_zval(stream, &arg1); in PHP_FUNCTION()
1366 if (php_stream_set_option(stream, PHP_STREAM_OPTION_BLOCKING, block == 0 ? 0 : 1, NULL) == -1) { in PHP_FUNCTION()
1383 php_stream *stream; in PHP_FUNCTION() local
1390 php_stream_from_zval(stream, &socket); in PHP_FUNCTION()
1401 …if (PHP_STREAM_OPTION_RETURN_OK == php_stream_set_option(stream, PHP_STREAM_OPTION_READ_TIMEOUT, 0… in PHP_FUNCTION()
1418 php_stream *stream; in PHP_FUNCTION() local
1424 php_stream_from_zval(stream, &arg1); in PHP_FUNCTION()
1430 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_WRITE_BUFFER, PHP_STREAM_BUFFER_NONE, NULL); in PHP_FUNCTION()
1432 …ret = php_stream_set_option(stream, PHP_STREAM_OPTION_WRITE_BUFFER, PHP_STREAM_BUFFER_FULL, &buff); in PHP_FUNCTION()
1446 php_stream *stream; in PHP_FUNCTION() local
1465 php_stream_from_zval(stream, &zstream); in PHP_FUNCTION()
1467 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_SET_CHUNK_SIZE, (int)csize, NULL); in PHP_FUNCTION()
1481 php_stream *stream; in PHP_FUNCTION() local
1487 php_stream_from_zval(stream, &arg1); in PHP_FUNCTION()
1493 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_READ_BUFFER, PHP_STREAM_BUFFER_NONE, NULL); in PHP_FUNCTION()
1495 ret = php_stream_set_option(stream, PHP_STREAM_OPTION_READ_BUFFER, PHP_STREAM_BUFFER_FULL, &buff); in PHP_FUNCTION()
1508 php_stream *stream, *sessstream = NULL; in PHP_FUNCTION() local
1516 php_stream_from_zval(stream, &zstream); in PHP_FUNCTION()
1523 if (php_stream_xport_crypto_setup(stream, cryptokind, sessstream TSRMLS_CC) < 0) { in PHP_FUNCTION()
1531 ret = php_stream_xport_crypto_enable(stream, enable TSRMLS_CC); in PHP_FUNCTION()
1570 php_stream *stream = NULL; in PHP_FUNCTION() local
1578 php_stream_from_zval(stream, zstream); in PHP_FUNCTION()
1579 if (stream == NULL) { in PHP_FUNCTION()
1582 wrapper = stream->wrapper; in PHP_FUNCTION()
1601 php_stream *stream; in PHP_FUNCTION() local
1608 php_stream_from_zval(stream, &zsrc); in PHP_FUNCTION()
1610 if (!php_stream_supports_lock(stream)) { in PHP_FUNCTION()
1628 php_stream *stream; in PHP_FUNCTION() local
1640 php_stream_from_zval(stream, &zstream); in PHP_FUNCTION()
1642 RETURN_BOOL(php_stream_xport_shutdown(stream, (stream_shutdown_t)how TSRMLS_CC) == 0); in PHP_FUNCTION()