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

请问能否提供利用GCDAsyncSocket 建立https的长连接的相关code,多谢~ #9

Open
FrankCYQ opened this issue Dec 30, 2017 · 0 comments

Comments

@FrankCYQ
Copy link

-(void)socket:(GCDAsyncSocket *)socket didConnectToHost:(NSString *)host port:(uint16_t)port{

NSMutableDictionary *settings = [[NSMutableDictionary alloc] init];

[settings setObject:[NSNumber numberWithBool:YES]
             forKey:GCDAsyncSocketManuallyEvaluateTrust];


[self.socket startTLS:settings];

}

在原有基础上增加上面代码,还是无法正常访问https server,

  • (void)socket:(GCDAsyncSocket *)sock didReceiveTrust:(SecTrustRef)trust completionHandler:(void (^)(BOOL))completionHandler
    这个回调方法不执行···
    多谢
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

No branches or pull requests

1 participant