docs/Enums/SocketIOClientOption.html
public enum SocketIOClientOption : ClientOption
The options for a client.
`
compress
`
If given, the WebSocket transport will attempt to use compression.
Swift
case compress
`
connectParams(_:)
`
A dictionary of GET parameters that will be included in the connect url.
Swift
case connectParams([String : Any])
`
cookies(_:)
`
An array of cookies that will be sent during the initial connection.
Swift
case cookies([HTTPCookie])
`
extraHeaders(_:)
`
Any extra HTTP headers that should be sent during the initial connection.
Swift
case extraHeaders([String : String])
`
forceNew(_:)
`
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.
Swift
case forceNew(Bool)
`
forcePolling(_:)
`
If passed true, the only transport that will be used will be HTTP long-polling.
Swift
case forcePolling(Bool)
`
forceWebsockets(_:)
`
If passed true, the only transport that will be used will be WebSockets.
Swift
case forceWebsockets(Bool)
`
enableSOCKSProxy(_:)
`
If passed true, the WebSocket stream will be configured with the enableSOCKSProxy true.
Swift
case enableSOCKSProxy(Bool)
`
handleQueue(_:)
`
The queue that all interaction with the client should occur on. This is the queue that event handlers are called on.
This should be a serial queue! Concurrent queues are not supported and might cause crashes and races.
Swift
case handleQueue(DispatchQueue)
`
log(_:)
`
If passed true, the client will log debug information. This should be turned off in production code.
Swift
case log(Bool)
`
logger(_:)
`
Used to pass in a custom logger.
Swift
case logger(SocketLogger)
`
path(_:)
`
A custom path to socket.io. Only use this if the socket.io server is configured to look for this path.
Swift
case path(String)
`
reconnects(_:)
`
If passed false, the client will not reconnect when it loses connection. Useful if you want full control over when reconnects happen.
Swift
case reconnects(Bool)
`
reconnectAttempts(_:)
`
The number of times to try and reconnect before giving up. Pass -1 to never give up.
Swift
case reconnectAttempts(Int)
`
reconnectWait(_:)
`
The minimum number of seconds to wait before reconnect attempts.
Swift
case reconnectWait(Int)
`
reconnectWaitMax(_:)
`
The maximum number of seconds to wait before reconnect attempts.
Swift
case reconnectWaitMax(Int)
`
randomizationFactor(_:)
`
The randomization factor for calculating reconnect jitter.
Swift
case randomizationFactor(Double)
`
secure(_:)
`
Set true if your server is using secure transports.
Swift
case secure(Bool)
`
security(_:)
`
Allows you to set which certs are valid. Useful for SSL pinning.
Swift
case security(CertificatePinning)
`
selfSigned(_:)
`
If you’re using a self-signed set. Only use for development.
Swift
case selfSigned(Bool)
`
sessionDelegate(_:)
`
Sets an NSURLSessionDelegate for the underlying engine. Useful if you need to handle self-signed certs.
Swift
case sessionDelegate(URLSessionDelegate)
`
version(_:)
`
The version of socket.io being used. This should match the server version. Default is 3.
Swift
case version(SocketIOVersion)
Properties
`
description
`
The description of this option.
Swift
public var description: String { get }
Operators
`
==(_:_:)
`
Compares whether two options are the same.
Swift
public static func == (lhs: SocketIOClientOption, rhs: SocketIOClientOption) -> Bool
| lhs |
Left operand to compare.
|
| rhs |
Right operand to compare.
|
true if the two are the same option.