Skip to content

Instantly share code, notes, and snippets.

Avatar

AZLisme AZLisme

View GitHub Profile
@AZLisme
AZLisme / test_connection_lost.py
Created May 8, 2017
test if flask-socket.io server can detect connection lost.
View test_connection_lost.py
# -*- encoding: utf-8 -*-
# **INSTALL REQUIREMENTS BEFORE TEST**
# pip install flask flask-socketio eventlet
# pip uninstall -y python-engineio
# pip install git+https://github.com/miguelgrinberg/python-engineio.git
from flask import Flask, render_template, request
from flask_socketio import SocketIO, emit
# Change to your local ip