> Hello. Some questions about websockets:
> 1) Can websockets be implemented within web2py without any in-socket
> server
> side component?
> 2) If yes, how is the constructor used on a local machine in the
> constructor, say, as:
> var ws = new WebSocket("ws://localhost/echo");
>
> Thank you!
>
> -uWSGI exposes a very fast websockets api you can easily use in web2py too. The problem is that once you complete the websocket handshake a whole thread will remains busy until the connection is not closed. You can reduce the problem spawning multiple threads, but you need a good amount of memory. This is an example echo server: https://github.com/unbit/uwsgi/blob/master/tests/websockets_echo.py basically you call uwsgi.websocket_handshake to ack the connection and then you can use uwsgi.websocket_recv and uwsgi.websocket_send -- Roberto De Ioris http://unbit.it -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

