MegaBits / SIOSocket

Realtime iOS application framework (client) http://socket.io
MIT License
494 stars 80 forks source link

Support for namespace #26

Open mahsuscuktan opened 9 years ago

mahsuscuktan commented 9 years ago

I have read the read me but cannot find anything about namespaces. Does SIOSocket support namespaces? If not do you consider implementing this enhancement?

mahsuscuktan commented 9 years ago

Actually, I have tried a little harder and found that it supports connecting to and communicating with namespace'd sockets. I think a simple readme update would suffice. I can connect to a namespace let's say:

    theIO= io.of('/messages');
    theIO.on('connection', function(socket){
        console.log('Connection on namespace');
    });

with this line of code:

[SIOSocket socketWithHost: @"localhost:3000/messages" response: ^(SIOSocket *socket) {...}];
pcperini commented 9 years ago

Curious, which would be a better API for namespaces:

Looking for anyone's input, thanks!

maziyarpanahi commented 9 years ago

@pcperini I think the second one is more cleaner for namespace