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

No ability to respond to client requested ack #9

Closed
TronPaul opened this issue Feb 17, 2014 · 4 comments
Closed

No ability to respond to client requested ack #9

TronPaul opened this issue Feb 17, 2014 · 4 comments

Comments

@TronPaul
Copy link

On client requested ack, gevent-socketio expects a handler to have return arguments https://github.com/abourget/gevent-socketio/blob/e2389b25933e1953fbbd5fa1d226c1b8e584565d/socketio/virtsocket.py#L403. Decorated methods' return values should be passed back up the stack to gevent-socketio.

@TronPaul
Copy link
Author

Think I fixed it in #11, but client requested acks can't be unit tested yet. That should be solved before closing this issue.

@TronPaul
Copy link
Author

Looking at the gevent-socketio library adding this to received wouldn't be correct because the return value of the handler methods isn't sent in an ack unless requested by the client. I think I'd store all the return values of the handlers in a list on the socket. Will add pull request.

@TronPaul
Copy link
Author

The pull request now solves both parts of the issue. The test client now returns what was returned by recv_*. Code that wishes to test acks can now store that return value and assert on it. No checks are made if it can or cannot be sent by the library (is it jsonable, etc).

@miguelgrinberg
Copy link
Owner

Closing, since this is fixed by #11

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