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

Custom parser for iOS app

Open fullstackuniverse opened this issue 7 years ago • 2 comments

//Javascript Client Side is const parser = require('socket.io-msgpack-parser'); const socket = io({ parser: parser});

//Server side is const io = require('socket.io')({ parser: parser});

//iOS ====================================== How can i implement the custom parser like the above? I think the socket.io-client-swift library has no answer for the custom parser... if server is working with parser, we have no way to implement it with iOS app?

fullstackuniverse avatar Jan 17 '19 14:01 fullstackuniverse

This isn't supported in an official manner at the moment. You could subclass SocketManager and override the parseEngineMessage method, and then call the event handler method on the correct socket.

nuclearace avatar Jan 22 '19 13:01 nuclearace

Is this still not supported?

I can see how reimplementing parseEngineMessage works, but what about publishing with a custom parser?

john-bagatta avatar Dec 22 '23 14:12 john-bagatta