Starscream
Starscream copied to clipboard
connect to a server with tls ssl PEM cert file
Hello
How is it possible to connect using a cert file? I've tried to do like so:
var request = URLRequest(url: URL(string: "tls://host.com:1234")!)
request.timeoutInterval = 10
let pinner = FoundationSecurity(allowSelfSigned: true)
var socket = WebSocket(request: request, certPinner: pinner)
socket?.delegate = self
socket?.connect()
and I've also added a didRecieve
func to recieve messages, but
- I didn't recieve anything
- I'm not using my certificate
is it possible to connect with a PEM cert file using this lib?