Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

socket.join doesn't exist #18

Open
sabrehagen opened this issue Sep 1, 2015 · 5 comments
Open

socket.join doesn't exist #18

sabrehagen opened this issue Sep 1, 2015 · 5 comments

Comments

@sabrehagen
Copy link

In vanilla socket.io, join exists on the socket object (see http://socket.io/docs/server-api/#socket#join(name:string[,-fn:function]):socket). When calling join on a socket in the function with signature function (socket, args, next), it is reported that socket.join is not a function. This means existing socket.io code is not directly compatible with socket.io-events. Can you add the join feature to the sockets for these functions please?

@sabrehagen
Copy link
Author

also, socket.broadcast.* doesn't work as expected.

@NathanGRomano
Copy link
Member

I am working on this. The socket is a wrapper that delegates calls to the real socket. It is possible to do socket.sock.join. However, that just feels dirty. So I will be working those issues out. Thanks for bringing this up. This gives me motivation to update it.

@sabrehagen
Copy link
Author

Thanks. That's great news. I transformed my whole socket.io code base to the express architecture as enabled by your project, and it instantly became far more expressive. It's such a massive improvement on the standard routing library, and a perfect integration with an existing express codebase. Unfortunately this was the only limiting factor so I had to postpone the conversion. Very much looking forward to having it :)

On another topic, what's your opinion on the format of the args parameter? It feels a little hacky to me. I'm finding myself putting at the head of every function

var event = args[0];
var data = args[1];
var callback = args[2];

What do you do when using the library?

@NathanGRomano
Copy link
Member

Well I currently do as you do right there. I have been meaning to get support for acknowledgements and support for parameters.

@NathanGRomano
Copy link
Member

I recently left my full time position with Aver Informatics. I had owned a company called Turbonetix IO that I gave up to join another company and that failed. So I moved the open source projects over to Full Stacker LLC. This is a new company that I am working on full time right now. There is a lot of work that my partner and I need to get done before we can commit to making significant changes to our projects. We really need to schedule 8 hours a week to updating these projects. I have so many things for this, and we really need to get ready for ES6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants