Lines Matching refs:net
348 MYSQLND_METHOD(mysqlnd_vio, set_client_option)(MYSQLND_VIO * const net, enum_mysqlnd_client_option … in MYSQLND_METHOD()
355 net->data->options.net_read_buffer_size = *(unsigned int*) value; in MYSQLND_METHOD()
356 DBG_INF_FMT("new_length=%zu", net->data->options.net_read_buffer_size); in MYSQLND_METHOD()
360 net->data->options.timeout_connect = *(unsigned int*) value; in MYSQLND_METHOD()
364 bool pers = net->persistent; in MYSQLND_METHOD()
365 if (net->data->options.ssl_key) { in MYSQLND_METHOD()
366 mnd_pefree(net->data->options.ssl_key, pers); in MYSQLND_METHOD()
368 net->data->options.ssl_key = value? mnd_pestrdup(value, pers) : NULL; in MYSQLND_METHOD()
373 bool pers = net->persistent; in MYSQLND_METHOD()
374 if (net->data->options.ssl_cert) { in MYSQLND_METHOD()
375 mnd_pefree(net->data->options.ssl_cert, pers); in MYSQLND_METHOD()
377 net->data->options.ssl_cert = value? mnd_pestrdup(value, pers) : NULL; in MYSQLND_METHOD()
382 bool pers = net->persistent; in MYSQLND_METHOD()
383 if (net->data->options.ssl_ca) { in MYSQLND_METHOD()
384 mnd_pefree(net->data->options.ssl_ca, pers); in MYSQLND_METHOD()
386 net->data->options.ssl_ca = value? mnd_pestrdup(value, pers) : NULL; in MYSQLND_METHOD()
391 bool pers = net->persistent; in MYSQLND_METHOD()
392 if (net->data->options.ssl_capath) { in MYSQLND_METHOD()
393 mnd_pefree(net->data->options.ssl_capath, pers); in MYSQLND_METHOD()
395 net->data->options.ssl_capath = value? mnd_pestrdup(value, pers) : NULL; in MYSQLND_METHOD()
400 bool pers = net->persistent; in MYSQLND_METHOD()
401 if (net->data->options.ssl_cipher) { in MYSQLND_METHOD()
402 mnd_pefree(net->data->options.ssl_cipher, pers); in MYSQLND_METHOD()
404 net->data->options.ssl_cipher = value? mnd_pestrdup(value, pers) : NULL; in MYSQLND_METHOD()
409 bool pers = net->persistent; in MYSQLND_METHOD()
410 if (net->data->options.ssl_passphrase) { in MYSQLND_METHOD()
411 mnd_pefree(net->data->options.ssl_passphrase, pers); in MYSQLND_METHOD()
413 net->data->options.ssl_passphrase = value? mnd_pestrdup(value, pers) : NULL; in MYSQLND_METHOD()
435 net->data->options.ssl_verify_peer = val; in MYSQLND_METHOD()
439 net->data->options.timeout_read = *(unsigned int*) value; in MYSQLND_METHOD()
443 net->data->options.timeout_write = *(unsigned int*) value; in MYSQLND_METHOD()
456 MYSQLND_METHOD(mysqlnd_vio, consume_uneaten_data)(MYSQLND_VIO * const net, enum php_mysqlnd_server_… in MYSQLND_METHOD()
469 php_stream * net_stream = net->data->get_stream(net); in MYSQLND_METHOD()
492 bytes_consumed, mysqlnd_command_to_text[net->last_command]); in MYSQLND_METHOD()
495 bytes_consumed, mysqlnd_command_to_text[net->last_command]); in MYSQLND_METHOD()
498 net->last_command = cmd; in MYSQLND_METHOD()
512 MYSQLND_METHOD(mysqlnd_vio, enable_ssl)(MYSQLND_VIO * const net) in MYSQLND_METHOD()
516 php_stream * net_stream = net->data->m.get_stream(net); in MYSQLND_METHOD()
521 if (net->data->options.ssl_key) { in MYSQLND_METHOD()
523 ZVAL_STRING(&key_zval, net->data->options.ssl_key); in MYSQLND_METHOD()
528 if (net->data->options.ssl_cert) { in MYSQLND_METHOD()
530 ZVAL_STRING(&cert_zval, net->data->options.ssl_cert); in MYSQLND_METHOD()
532 if (!net->data->options.ssl_key) { in MYSQLND_METHOD()
538 if (net->data->options.ssl_ca) { in MYSQLND_METHOD()
540 ZVAL_STRING(&cafile_zval, net->data->options.ssl_ca); in MYSQLND_METHOD()
545 if (net->data->options.ssl_capath) { in MYSQLND_METHOD()
547 ZVAL_STRING(&capath_zval, net->data->options.ssl_capath); in MYSQLND_METHOD()
552 if (net->data->options.ssl_passphrase) { in MYSQLND_METHOD()
554 ZVAL_STRING(&passphrase_zval, net->data->options.ssl_passphrase); in MYSQLND_METHOD()
559 if (net->data->options.ssl_cipher) { in MYSQLND_METHOD()
561 ZVAL_STRING(&cipher_zval, net->data->options.ssl_cipher); in MYSQLND_METHOD()
570 if (net->data->options.ssl_verify_peer == MYSQLND_SSL_PEER_DEFAULT) { in MYSQLND_METHOD()
571 …net->data->options.ssl_verify_peer = any_flag? MYSQLND_SSL_PEER_DEFAULT_ACTION:MYSQLND_SSL_PEER_DO… in MYSQLND_METHOD()
574 verify = net->data->options.ssl_verify_peer == MYSQLND_SSL_PEER_VERIFY? TRUE:FALSE; in MYSQLND_METHOD()
580 if (net->data->options.ssl_verify_peer == MYSQLND_SSL_PEER_DONT_VERIFY) { in MYSQLND_METHOD()
596 net->data->ssl = TRUE; in MYSQLND_METHOD()
606 if (net->data->options.timeout_read) { in MYSQLND_METHOD()
608 DBG_INF_FMT("setting %u as PHP_STREAM_OPTION_READ_TIMEOUT", net->data->options.timeout_read); in MYSQLND_METHOD()
609 tv.tv_sec = net->data->options.timeout_read; in MYSQLND_METHOD()
636 MYSQLND_METHOD(mysqlnd_vio, free_contents)(MYSQLND_VIO * net) in MYSQLND_METHOD()
638 bool pers = net->persistent; in MYSQLND_METHOD()
641 if (net->data->options.ssl_key) { in MYSQLND_METHOD()
642 mnd_pefree(net->data->options.ssl_key, pers); in MYSQLND_METHOD()
643 net->data->options.ssl_key = NULL; in MYSQLND_METHOD()
645 if (net->data->options.ssl_cert) { in MYSQLND_METHOD()
646 mnd_pefree(net->data->options.ssl_cert, pers); in MYSQLND_METHOD()
647 net->data->options.ssl_cert = NULL; in MYSQLND_METHOD()
649 if (net->data->options.ssl_ca) { in MYSQLND_METHOD()
650 mnd_pefree(net->data->options.ssl_ca, pers); in MYSQLND_METHOD()
651 net->data->options.ssl_ca = NULL; in MYSQLND_METHOD()
653 if (net->data->options.ssl_capath) { in MYSQLND_METHOD()
654 mnd_pefree(net->data->options.ssl_capath, pers); in MYSQLND_METHOD()
655 net->data->options.ssl_capath = NULL; in MYSQLND_METHOD()
657 if (net->data->options.ssl_cipher) { in MYSQLND_METHOD()
658 mnd_pefree(net->data->options.ssl_cipher, pers); in MYSQLND_METHOD()
659 net->data->options.ssl_cipher = NULL; in MYSQLND_METHOD()
669 MYSQLND_METHOD(mysqlnd_vio, close_stream)(MYSQLND_VIO * const net, MYSQLND_STATS * const stats, MYS… in MYSQLND_METHOD()
673 if (net && (net_stream = net->data->m.get_stream(net))) { in MYSQLND_METHOD()
674 bool pers = net->persistent; in MYSQLND_METHOD()
688 net->data->m.set_stream(net, NULL); in MYSQLND_METHOD()
698 MYSQLND_METHOD(mysqlnd_vio, init)(MYSQLND_VIO * const net, MYSQLND_STATS * const stats, MYSQLND_ERR… in MYSQLND_METHOD()
704 net->data->m.set_client_option(net, MYSQLND_OPT_NET_READ_BUFFER_SIZE, (char *)&buf_size); in MYSQLND_METHOD()
707 net->data->m.set_client_option(net, MYSQL_OPT_READ_TIMEOUT, (char *)&buf_size); in MYSQLND_METHOD()
732 MYSQLND_METHOD(mysqlnd_vio, get_stream)(const MYSQLND_VIO * const net) in MYSQLND_METHOD()
735 DBG_INF_FMT("%p", net? net->data->stream:NULL); in MYSQLND_METHOD()
736 DBG_RETURN(net? net->data->stream:NULL); in MYSQLND_METHOD()