You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -77,7 +76,6 @@ open class WebSocket : NSObject, StreamDelegate {
77
76
varoptionalProtocols:[String]?
78
77
79
78
// MARK: - Constants
80
-
81
79
letheaderWSUpgradeName="Upgrade"
82
80
letheaderWSUpgradeValue="websocket"
83
81
letheaderWSHostName="Host"
@@ -108,7 +106,6 @@ open class WebSocket : NSObject, StreamDelegate {
108
106
}
109
107
110
108
// MARK: - Delegates
111
-
112
109
/// Responds to callback about new messages coming in over the WebSocket
113
110
/// and also connection/disconnect messages.
114
111
public weak vardelegate:WebSocketDelegate?
@@ -118,7 +115,6 @@ open class WebSocket : NSObject, StreamDelegate {
118
115
119
116
120
117
// MARK: - Block based API.
121
-
122
118
publicvaronConnect:((Void)->Void)?
123
119
publicvaronDisconnect:((NSError?)->Void)?
124
120
publicvaronText:((String)->Void)?
@@ -128,7 +124,7 @@ open class WebSocket : NSObject, StreamDelegate {
128
124
publicvarheaders=[String: String]()
129
125
publicvarvoipEnabled=false
130
126
publicvardisableSSLCertValidation=false
131
-
publicvarsecurity:SSLSecurity?
127
+
publicvarsecurity:SSLTrustValidator?
132
128
publicvarenabledSSLCipherSuites:[SSLCipherSuite]?
133
129
publicvarorigin:String?
134
130
publicvartimeout=5
@@ -139,7 +135,6 @@ open class WebSocket : NSObject, StreamDelegate {
139
135
publicvarcurrentURL:URL{return url }
140
136
141
137
// MARK: - Private
142
-
143
138
privatevarurl:URL
144
139
privatevarinputStream:InputStream?
145
140
privatevaroutputStream:OutputStream?
@@ -190,11 +185,8 @@ open class WebSocket : NSObject, StreamDelegate {
190
185
191
186
/**
192
187
Disconnect from the server. I send a Close control frame to the server, then expect the server to respond with a Close control frame and close the socket from its end. I notify my delegate once the socket has been closed.
193
-
194
188
If you supply a non-nil `forceTimeout`, I wait at most that long (in seconds) for the server to close the socket. After the timeout expires, I close the socket and notify my delegate.
195
-
196
189
If you supply a zero (or negative) `forceTimeout`, I immediately close the socket (without sending a Close control frame) and notify my delegate.
197
-
198
190
- Parameter forceTimeout: Maximum time to wait for the server to close the socket.
199
191
- Parameter closeCode: The code to send on disconnect. The default is the normal close code for cleanly disconnecting a webSocket.
200
192
*/
@@ -216,9 +208,7 @@ open class WebSocket : NSObject, StreamDelegate {
216
208
217
209
/**
218
210
Write a string to the websocket. This sends it as a text frame.
219
-
220
211
If you supply a non-nil completion block, I will perform it when the write completes.
221
-
222
212
- parameter string: The string to write.
223
213
- parameter completion: The (optional) completion handler.
224
214
*/
@@ -229,9 +219,7 @@ open class WebSocket : NSObject, StreamDelegate {
229
219
230
220
/**
231
221
Write binary data to the websocket. This sends it as a binary frame.
232
-
233
222
If you supply a non-nil completion block, I will perform it when the write completes.
234
-
235
223
- parameter data: The data to write.
236
224
- parameter completion: The (optional) completion handler.
237
225
*/
@@ -313,7 +301,6 @@ open class WebSocket : NSObject, StreamDelegate {
0 commit comments