资 源 简 介
Version 0.5 is available
The source repository has been migrated to bitbucket: https://bitbucket.org/reidyd/legume.
Designed primarily for use in cross-platform game development, legume provides non-reliable, reliable and in-order transmission of messages via UDP. The focus behind the features and design of legume:
Cater for the networking requirements of a multiplayer game with as little boiler-plate code as possible.
Peaceful co-existence with widely-used game development frameworks and libraries such as pygame and pyglet.
Don"t rely on third-party libraries or platform specific functionality.
An example client with an event handler:
```
import legume
from time import sleep
def onconnected(sender, eventargs):
print "Connected to server"
client = legume.Client()
client.OnConnectRequestAccepted += on_connected
client.connect(("host.example.com", 4000))