socket.io-client-swift icon indicating copy to clipboard operation
socket.io-client-swift copied to clipboard

Declare configs on Swift 2.3

Open rheza opened this issue 10 years ago • 1 comments

Hi Guys,

So sorry for this simple question, But how do i declare configs on the socketioclient ?

previously I can just copy the example on readme, which is, let socket = SocketIOClient(socketURL: URL(string: "http://localhost:8080")!, config: [.log(true), .forcePolling(true)])

now i can only do this, self.socket = SocketIOClient(socketURL: NSURL(string: "http://localhost:8080")!)

adding configs will throw me an error, any suggestion ?

rheza avatar Sep 20 '16 03:09 rheza

That's easy than I Thought.

socket = SocketIOClient(socketURL: NSURL(string: "http://localhost:8080")!,config:[.ForceWebsockets(true)])

Thanks

rheza avatar Sep 20 '16 07:09 rheza