unable to maintain WebSocket stable connection

Hi Aaron,

I hope you’re doing well.

I am currently working on implementing WebSocket functionality for my iOS application, specifically for subscribing and publishing messages to a queue. While I have been able to successfully connect to a WebSocket server and perform publish/subscribe operations using a third-party WebSocket URL(piehost), I am now looking for guidance on how to achieve the same functionality using your platform.

Could you please provide the iOS WebSocket code or any documentation that outlines the necessary steps for subscribing and publishing messages? Additionally, I would appreciate it if you could include details on how to specify and interact with a particular queue (including the format and usage of queue names within the WebSocket communication).

Thank you in advance for your support! Any code samples or resources you can share would be greatly appreciated.

I have created nodes JS web socket URL `wss://mr-connection-d5h1qye30cs.messaging.solace.cloud:443

`

Source code :


func connectToWebSocket() {
     var request = URLRequest(url: URL(string: webSocketURL)!)
         request.timeoutInterval = 5
      let authString = "\(userName):\(password)"
      let authData = authString.data(using: .utf8)!
        let base64AuthString = authData.base64EncodedString()
        request.setValue("Basic \(base64AuthString)", forHTTPHeaderField: "Authorization")
        request.setValue(vpnName, forHTTPHeaderField: "VPN")
        socket = WebSocket(request: reques)
        socket.delegate = self  socket.connect()


    }

Please check above code and let me know any changes required?