Skip to content
This repository has been archived by the owner on Aug 28, 2022. It is now read-only.
/ raknet-python Public archive

Python bindings to rust-raknet native library.

License

Notifications You must be signed in to change notification settings

b23r0/raknet-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

raknet-python

Build Status PyPI ChatOnDiscord

Python bindings to rust-raknet native library.

Install

pip install raknet-python

Prebuilds are provided for Python3.8 64-bit Windows/Linux. If a prebuild does not work, please create an issue.

Build

The RaknetClient and RaknetServer classes are Python wrappers for the internal RaknetSocket and RaknetListener classes implemented in Rust in src/. All methods use asynchronous wrappers.

from raknet_python import RaknetServer,RaknetClient

server = RaknetServer("127.0.0.1:19132")
client1 = RaknetClient("127.0.0.1:19132")

client2 = server.accept()
# first byte must be 0xfe
client1.send([0xfe , 0x01 , 0x01 , 0x01])
buf = client2.recv()
assert buf == [0xfe , 0x01 , 0x01 , 0x01]

About

Python bindings to rust-raknet native library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published