old-bear commented on issue #1096: URL: https://github.com/apache/incubator-brpc/issues/1096#issuecomment-619035162
`DoRead`这个函数设计返回0即约定表示遇到EOF,这也和非SSL情况统一,同时外层`input_messenger.cpp`中也会相应处理,因此SSL_read return 0直接返回0就行。由于brpc中不允许半关闭读写的情况,对于对端EOF情况只需直接close本端就行。 另外brpc中一个连接要么一直是SSL,要么永远是非SSL,不会来回再SSL状态间切换,因此也不需要SSL_shutdown。 `cut_into_SSL_channel`在nw=0时也会设置ssl_error,外层`DoWrite`也会捕获感知设置errno。 从池中(`SocketPool`)拿出的Socket,是不会再次ssl_handshake的。因为连接池模式保证一次请求结束前独占这个Socket,后续拿出时其ssl_state应该set过了。 BIO的api调用,一部分是为了证书buffer,另一部分是为了能让用户设置SSL底层读写的buffer大小,具体读写没有用BIO_read/write ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
