Lines Matching refs:net_stream
79 php_stream * net_stream = vio->data->m.get_stream(vio); in MYSQLND_METHOD() local
87 ssize_t ret = php_stream_read(net_stream, (char *) p, to_read); in MYSQLND_METHOD()
115 static void mysqlnd_fixup_regular_list(php_stream *net_stream) in mysqlnd_fixup_regular_list() argument
124 zend_hash_index_del(&EG(regular_list), net_stream->res->handle); in mysqlnd_fixup_regular_list()
126 efree(net_stream->res); in mysqlnd_fixup_regular_list()
127 net_stream->res = NULL; in mysqlnd_fixup_regular_list()
136 php_stream * net_stream = NULL; in MYSQLND_METHOD() local
143 …net_stream = php_stream_open_wrapper(scheme.s + sizeof("pipe://") - 1, "r+", streams_options, NULL… in MYSQLND_METHOD()
144 if (!net_stream) { in MYSQLND_METHOD()
161 if (current_res->ptr == net_stream) { in MYSQLND_METHOD()
171 php_stream_auto_cleanup(net_stream); in MYSQLND_METHOD()
175 mysqlnd_fixup_regular_list(net_stream); in MYSQLND_METHOD()
177 DBG_RETURN(net_stream); in MYSQLND_METHOD()
195 php_stream * net_stream = NULL; in MYSQLND_METHOD() local
212 net_stream = php_stream_xport_create(scheme.s, scheme.l, streams_options, streams_flags, in MYSQLND_METHOD()
215 if (errstr || !net_stream) { in MYSQLND_METHOD()
239 ZEND_ASSERT(le->ptr == net_stream); in MYSQLND_METHOD()
253 php_stream_auto_cleanup(net_stream); in MYSQLND_METHOD()
258 mysqlnd_fixup_regular_list(net_stream); in MYSQLND_METHOD()
259 DBG_RETURN(net_stream); in MYSQLND_METHOD()
269 php_stream * net_stream = vio->data->m.get_stream(vio); in MYSQLND_METHOD() local
271 if (net_stream) { in MYSQLND_METHOD()
277 php_stream_set_option(net_stream, PHP_STREAM_OPTION_READ_TIMEOUT, 0, &tv); in MYSQLND_METHOD()
282 mysqlnd_set_sock_no_delay(net_stream); in MYSQLND_METHOD()
284 mysqlnd_set_sock_keepalive(net_stream); in MYSQLND_METHOD()
287 net_stream->chunk_size = vio->data->options.net_read_buffer_size; in MYSQLND_METHOD()
288 net_stream->flags |= PHP_STREAM_FLAG_SUPPRESS_ERRORS; in MYSQLND_METHOD()
334 php_stream * net_stream = open_stream(vio, scheme, persistent, conn_stats, error_info); in MYSQLND_METHOD() local
335 if (net_stream && PASS == vio->data->m.set_stream(vio, net_stream)) { in MYSQLND_METHOD()
469 php_stream * net_stream = net->data->get_stream(net); in MYSQLND_METHOD() local
470 int was_blocked = net_stream->ops->set_option(net_stream, opt, 0, NULL); in MYSQLND_METHOD()
479 bytes_consumed = php_stream_read(net_stream, tmp_buf, sizeof(tmp_buf)); in MYSQLND_METHOD()
487 net_stream->ops->set_option(net_stream, opt, 1, NULL); in MYSQLND_METHOD()
516 php_stream * net_stream = net->data->m.get_stream(net); in MYSQLND_METHOD() local
585 php_stream_context_set(net_stream, context); in MYSQLND_METHOD()
590 if (php_stream_xport_crypto_setup(net_stream, STREAM_CRYPTO_METHOD_TLS_CLIENT, NULL) < 0 || in MYSQLND_METHOD()
591 php_stream_xport_crypto_enable(net_stream, 1) < 0) in MYSQLND_METHOD()
604 php_stream_context_set(net_stream, NULL); in MYSQLND_METHOD()
611 php_stream_set_option(net_stream, PHP_STREAM_OPTION_READ_TIMEOUT, 0, &tv); in MYSQLND_METHOD()
671 php_stream * net_stream; in MYSQLND_METHOD() local
673 if (net && (net_stream = net->data->m.get_stream(net))) { in MYSQLND_METHOD()
675 DBG_INF_FMT("Freeing stream. abstract=%p", net_stream->abstract); in MYSQLND_METHOD()
680 php_stream_free(net_stream, PHP_STREAM_FREE_CLOSE_PERSISTENT | PHP_STREAM_FREE_RSRC_DTOR); in MYSQLND_METHOD()
686 php_stream_free(net_stream, PHP_STREAM_FREE_CLOSE | PHP_STREAM_FREE_RSRC_DTOR); in MYSQLND_METHOD()
743 MYSQLND_METHOD(mysqlnd_vio, set_stream)(MYSQLND_VIO * const vio, php_stream * net_stream) in MYSQLND_METHOD()
747 vio->data->stream = net_stream; in MYSQLND_METHOD()