amphp / socket

Non-blocking socket and TLS functionality for PHP based on Amp.
https://amphp.org/socket
MIT License
237 stars 38 forks source link

Use separate interfaces for TLS management and TLS state inspection #92

Closed bwoebi closed 1 year ago

bwoebi commented 2 years ago

shutdownTLS and setupTLS indicate that a sockets TLS can be setup or shutdown.

However, an encrypted socket may want to expose that information without offering to change the TLS state - use cases are when wrapping another socket or also concretely, QUIC, which is forcibly using TLS, setup and shutdown not possible.

kelunik commented 1 year ago

Introducing even more interfaces doesn't really make sense here, so we did the opposite in #100.