Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

https support #17

Open
superjimpupcake opened this issue Aug 20, 2012 · 1 comment
Open

https support #17

superjimpupcake opened this issue Aug 20, 2012 · 1 comment

Comments

@superjimpupcake
Copy link

Hi,
Is there anyway that php-uv can support ssl in a non-blocking fashion?
In my framework, I used stream_socket_server, like the following:
stream_context_set_option($context, 'ssl', 'local_cert', $certificate);
stream_context_set_option($context, 'ssl', 'verify_peer', false);
$server = stream_socket_server("$protocol://$ip:$port", $errno,$errstr,STREAM_SERVER_BIND|STREAM_SERVER_LISTEN, $context);
The ssl part works but seems like it is blocking, I tried to make it non-blocking by doing:
stream_set_blocking($server, 0);
Things stop working.
Are there any ways that php-uv can help make serving ssl in an async fashion?
Thanks.
Best Regards,
Jim

@chobie
Copy link
Owner

chobie commented Aug 20, 2012

Hi Jim. currently, uv_tcp_init and uv_udp_init does not support SSL as far as I known.

I guess uv_fs_poll_start could be handle stream server resource. but I didn't try yet.
https://github.com/chobie/php-uv#uv-uv_fs_poll_startresource-handle-callback-string-path-long-interval

I'll plan to support SSL socket. but I haven't try SSL programming yet. so this will take little bit long time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants