Socket.IO-Client-Swift icon indicating copy to clipboard operation
Socket.IO-Client-Swift copied to clipboard

Socket connection not established

Open ptunde opened this issue 9 years ago • 2 comments

Hi,

I'm trying to reproduce a socket connetion I did in javascript using swift, but I'm getting "Invalid HTTP upgrade" error message

  • My Swift Socket IO Options are the following: let options = [ .ForceWebsockets(true), .ForcePolling(true) .ForceNew(true), .Reconnects(false), .Secure(true), .Path("/socket"), .Log(true) ]
  • The options which are working in JavaScript are: const ioptions = { transports: ['websocket'], 'force new connection': true, reconnect: true, secure: true, path: '/socket', jsonp: false };

Could you please suggest what I'm doing wrong, and is there a swift alternative for the "jsonp" I was using in javascript?

Thank you.

ptunde avatar Jun 16 '16 16:06 ptunde

For your path try "/socket/"

nuclearace avatar Jun 16 '16 16:06 nuclearace

Thank you for the answer. It's working now 👍

ptunde avatar Jun 16 '16 17:06 ptunde