-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
websockets #194
Comments
Sure! I think it is pretty strait forward. start_websocket() should accept request parameter same as start(), it should initiate websocket handshake, and return reader and writer objects. Similar to websocket examples |
start_websocket() is StreamResponse's method. It can return just reader object and for writing we can reuse write() and write_eof() methods @asvetlov thoughts? |
I was thinking of passing the RequestHandler to the request and work all the magic in start_websockets. And then when you want to close the websocket we can call a close_websocket method on the request object. This way the logic remains in the handler. I'm going to make a push in a couple of hours with the code from my app ported to the library. |
passing RequestHandler is bad idea. |
I meant passing the instance not the class :) Sent from my iPhone
|
passing request handler instance into request is bad idea |
OK I was running some tests and I get this error: Why would the the HandleManager be called in _SelectorSocketTransport? |
I made a pull request on master. |
I made an quick hack to make work websockets with the high level api. Probably not the best way to go. |
@amirouche aiohttp already has websockets support, no need for external package. -1 @vlad-dragos btw what it the status? |
@fafhrd91 the code is ready but wirh the end of the year it was a bit chaotic and I haven't had the time to do the unit test. I was planing on doing them this weekend. |
sounds good! |
websockets implemented in #220 |
Hi,
I'm working on a personal project that uses websockets. I'm currently refactoring my app to use the new aiohttp.web API and from what I see in the source code there is a start_websocket method in the aiohttp.web.Response class. Is there any way that I can help with the development on that so it gets added? :)
The text was updated successfully, but these errors were encountered: