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

fix: support ssl, no need to initial ssl lib when use. #57

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Charist
Copy link

@Charist Charist commented Jun 8, 2020

作为独立的模块,外面使用时最好感知不到ssl相关api。(不知这样设计,是否是因为怕多个模块都引用ssl导致多次初始化?)

@@ -93,6 +93,10 @@ namespace brynet { namespace net {
{
return false;
}
SSL_library_init();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里加上的话,用户构建SSL服务的话,省以下调用,没问题。
另外,客户端的SSL,仍然需要用户自己手动调用。 目前没找到怎么去帮助客户端调用。(如果这些调用不太耗时的话,倒是可以放在 https://github.com/IronsDu/brynet/blob/master/include/brynet/net/TcpConnection.hpp#L354 里。)
另外,我还不太确认这几个函数是否线程安全和是否可重复调用。

@@ -6,6 +6,7 @@
#include <brynet/net/TcpService.hpp>
#include <brynet/net/wrapper/ServiceBuilder.hpp>
#include <brynet/base/AppStatus.hpp>
//#define USE_SSL
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感觉这个例子不需要做修改

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

Successfully merging this pull request may close these issues.

2 participants