# 长轮询 **Repository Path**: kuankuan2007/long-polling ## Basic Information - **Project Name**: 长轮询 - **Description**: 简单易用的python长轮询库 - **Primary Language**: Unknown - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2023-04-26 - **Last Updated**: 2025-01-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 长轮询(longPolling) ```bash pip install longPolling ``` ## 客户端 ### 单向传输 ```python import longPolling example=longPolling.client.Client(url, callback) example.login(uername) ``` ### 双向传输 ```python import longPolling example=longPolling.client.BothwayClient(url, callback) example.login(uername) example.send(data) ``` ## 服务端 ### 单向传输 ```python import longPolling example=longPolling.server.Server(host,port) example.send(username,message) ``` ### 双向传输 ```python import longPolling example=longPolling.server.BothwayServer(host,port,callback) example.send(username,message) ``` ## 关于作者 作者主页[宽宽2007](https://kuankuan2007.gitee.io "作者主页") pypi[longPolling · PyPI](https://pypi.org/project/longPolling/) 本项目在[苟浩铭/长轮询 (gitee.com)](https://gitee.com/kuankuan2007/long-polling)上开源 帮助文档参见[宽宽的帮助文档](https://kuankuan2007.gitee.io/docs/long-polling)