Skip to content

Instantly share code, notes, and snippets.

View AZLisme's full-sized avatar
😀

AZLisme AZLisme

😀
View GitHub Profile
@AZLisme
AZLisme / test_connection_lost.py
Created May 8, 2017 02:12
test if flask-socket.io server can detect connection lost.
# -*- 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