socketio / socket.io-client-java

Full-featured Socket.IO Client Library for Java, which is compatible with Socket.IO v1.0 and later.
https://socketio.github.io/socket.io-client-java/installation.html
Other
5.31k stars 969 forks source link

How to send auth parameter while connecting with socket? #735

Open najamsaqib-devcreew opened 1 year ago

najamsaqib-devcreew commented 1 year ago

Like we send auth parameter ion iOS using the following way, But I couldn't found a way to send It same in iOS.

  chatSocketManager = SocketManager(socketURL: socketURL, config: [.log(true), .compress])             
 chatSocketManager.defaultSocket.on(clientEvent: .connect) {data, ack in
            print("socket connected")
           self.chatSocketManager.defaultSocket.joinNamespace()
        }
 let dict =  [ "access" : accessToken,
                         "public": publicToken,
                         "timestamp" : "\(timeStamp)"]
chatSocketManager.defaultSocket.connect(withPayload: dict)

Need Someone Help. Thanks