-
Notifications
You must be signed in to change notification settings - Fork 15
Sockjs integration #62
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
base: master
Are you sure you want to change the base?
Sockjs integration #62
Conversation
|
awesome pull request! this is the right place to make it. |
|
Cool! So this doesn't handle the Having the notions of 'engines` or 'plugins' is a pattern we have been removing from Big. Everything should be a resource. This would mean creating a In order to get this merged, we'll need to:
|
|
Aha! I was wondering about that. Sweet! I'm on it. |
|
Whoops |
…le, added tests to socket module, added resources folder to gitignore
|
So I've split out the sockjs and socket.io engines into separate resources. What bothered me a little bit was that I couldn't use For testing, instead of using .use I just |
|
Let me know if I refactored it right. What I wasn't entirely sure about was whether to keep the rpc-logic in the socket resource or put them into the individual resources. I've done the latter for now and the socket resource is now only really triggering .use. |
|
@Marak as far as I remember you said that you'd like more bi-directional tests for the sockjs resource and a different name, something like socket-sockjs am I right? Unfortunately I lost that chat history, was on my phone. Could you clarify please, get into more detail about what tests you were looking for? Would love to get this done soon. Cheers |
…ources, fixed sockjs test to stop at end, minor fix to socket schema, other minor edits usually JSLINT related
|
i wouldn't rename to socket-* just yet as think as for bi-directional tests i would imagine that means a test where the client sends a message to the server and the server responds with another message or vise versa. play around with both ends sending and receiving. |
|
Thanks! I'll get on that. I think it'd make sense to have a resource method called send, write or emit, which sends messages to all connections. Would you agree? PS: Do you guys use particular JSLint settings? |
[socket] reviewed code, added dependencies to socketio and sockjs resources
|
yeah, that makes sense, go for it. JSLint config: https://github.com/bigcompany/big/blob/master/.jshintrc |
|
@ahdinosaur Oh stunning didn't see that you had posted that link. I haven't been able to do anything last week but I've fleshed most of what I had in mind for sockets just now. Not yet completely finished though, I just pushed these commits to back them up, will let you know when it's done so you can review. Many thanks. |
|
Ok. Sorry for the ridiculous delay. I had to get a new job. I've checked it over and linted. If you could review and merge that'd be fab :) |
I tried to stick as close to the socket.io implementation as possible. Same with the tests. All the tests I've put in so far are passing. They don't cover all that the socket.io tests cover yet I'm afraid.