SocketIOClientOption
public enum SocketIOClientOption : ClientOption
The options for a client.
-
If given, the WebSocket transport will attempt to use compression.
Declaration
Swift
case compress
-
A dictionary of GET parameters that will be included in the connect url.
Declaration
Swift
case connectParams([String: Any])
-
An array of cookies that will be sent during the initial connection.
Declaration
Swift
case cookies([HTTPCookie])
-
Deprecated
Declaration
Swift
case doubleEncodeUTF8(Bool)
-
Any extra HTTP headers that should be sent during the initial connection.
Declaration
Swift
case extraHeaders([String: String])
-
If passed
true
, will cause the client to always create a new engine. Useful for debugging, or when you want to be sure no state from previous engines is being carried over.Declaration
Swift
case forceNew(Bool)
-
If passed
true
, the only transport that will be used will be HTTP long-polling.Declaration
Swift
case forcePolling(Bool)
-
If passed
true
, the only transport that will be used will be WebSockets.Declaration
Swift
case forceWebsockets(Bool)
-
The queue that all interaction with the client should occur on. This is the queue that event handlers are called on.
Declaration
Swift
case handleQueue(DispatchQueue)
-
If passed
true
, the client will log debug information. This should be turned off in production code.Declaration
Swift
case log(Bool)
-
Used to pass in a custom logger.
Declaration
Swift
case logger(SocketLogger)
-
The namespace that this client should connect to. Can be changed during use using the
joinNamespace
andleaveNamespace
methods onSocketIOClient
.Declaration
Swift
case nsp(String)
-
A custom path to socket.io. Only use this if the socket.io server is configured to look for this path.
Declaration
Swift
case path(String)
-
If passed
false
, the client will not reconnect when it loses connection. Useful if you want full control over when reconnects happen.Declaration
Swift
case reconnects(Bool)
-
The number of times to try and reconnect before giving up. Pass
-1
to never give up.Declaration
Swift
case reconnectAttempts(Int)
-
The number of seconds to wait before reconnect attempts.
Declaration
Swift
case reconnectWait(Int)
-
Set
true
if your server is using secure transports.Declaration
Swift
case secure(Bool)
-
Allows you to set which certs are valid. Useful for SSL pinning.
Declaration
Swift
case security(SSLSecurity)
-
If you’re using a self-signed set. Only use for development.
Declaration
Swift
case selfSigned(Bool)
-
Sets an NSURLSessionDelegate for the underlying engine. Useful if you need to handle self-signed certs.
Declaration
Swift
case sessionDelegate(URLSessionDelegate)
-
If passed
true
, the WebSocket transport will try and use voip logic to keep network connections open in the background. This option is experimental as socket.io shouldn’t be used for background communication.Declaration
Swift
case voipEnabled(Bool)
-
The description of this option.
Declaration
Swift
public var description: String