Uma biblioteca simples para comunicação p2p na rede local
Project description
Lion
Uma biblioteca simples para comunicação p2p na rede local
Instalar
$ pip install -e lion
Exemplo
from random import randint
from peer import Peer
class HelloPeer(Peer):
def on_found(self, peer: "Peer"):
print('i am', self)
print('found', peer)
peer.send(b'hello peer!')
def on_message(self, peer: "Peer", message: bytes):
print('received', message, 'from', peer)
if __name__ == '__main__':
HelloPeer('0.0.0.0', randint(8800, 8888)).run()
2022 - Marcel Guinhos de Menezes
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for pylion_yellowakita-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc0876b42f186b80734a2251c107c1e09b17ea3fdd73581e51e54c33eb89ef9a |
|
MD5 | 1fc1a62b9aa40d50fb709e7f6e6fcf85 |
|
BLAKE2b-256 | 5c670223def122d604a2edf854d44725988d9d8cff783c9c9cff927016b812bd |