Why are gevent websockets sending at unpredictable rates
up vote
0
down vote
favorite
I have code similar to the code below:
def app(environ, start_response):
websocket = environ['wsgi.websocket']
while True:
#spawn recvWs every time a new client connects
data = 'sample data'
websocket.send(data)
gevent.sleep(0)
if __name__ == '__main__':
server = WSGIServer(("0.0.0.0", 80), app,handler_class=WebSocketHandler)
server.serve_forever()
Though it seems the websocket messages are being sent to the client at unpredictable rates. How can I get around this?
python-3.x websocket gevent greenlets
add a comment |
up vote
0
down vote
favorite
I have code similar to the code below:
def app(environ, start_response):
websocket = environ['wsgi.websocket']
while True:
#spawn recvWs every time a new client connects
data = 'sample data'
websocket.send(data)
gevent.sleep(0)
if __name__ == '__main__':
server = WSGIServer(("0.0.0.0", 80), app,handler_class=WebSocketHandler)
server.serve_forever()
Though it seems the websocket messages are being sent to the client at unpredictable rates. How can I get around this?
python-3.x websocket gevent greenlets
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have code similar to the code below:
def app(environ, start_response):
websocket = environ['wsgi.websocket']
while True:
#spawn recvWs every time a new client connects
data = 'sample data'
websocket.send(data)
gevent.sleep(0)
if __name__ == '__main__':
server = WSGIServer(("0.0.0.0", 80), app,handler_class=WebSocketHandler)
server.serve_forever()
Though it seems the websocket messages are being sent to the client at unpredictable rates. How can I get around this?
python-3.x websocket gevent greenlets
I have code similar to the code below:
def app(environ, start_response):
websocket = environ['wsgi.websocket']
while True:
#spawn recvWs every time a new client connects
data = 'sample data'
websocket.send(data)
gevent.sleep(0)
if __name__ == '__main__':
server = WSGIServer(("0.0.0.0", 80), app,handler_class=WebSocketHandler)
server.serve_forever()
Though it seems the websocket messages are being sent to the client at unpredictable rates. How can I get around this?
python-3.x websocket gevent greenlets
python-3.x websocket gevent greenlets
asked Nov 11 at 6:42
Dup Dup
156
156
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53246457%2fwhy-are-gevent-websockets-sending-at-unpredictable-rates%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown