mkRPG
 All Classes Namespaces Functions
Public Member Functions | Public Attributes
shared.network.NetworkServer Class Reference

List of all members.

Public Member Functions

def __init__
def waitForClients
def connect
def run
def sendOrder
def broadcast

Public Attributes

 handle
 pluginHandle
 loop
 connections
 server

Detailed Description

This class is the task of the server that manages clients connections on
his port.  It keeps the list of connected clients and provides method to
broadcast messages to all the clients.

Constructor & Destructor Documentation

def shared.network.NetworkServer.__init__ (   self,
  handle,
  pluginHandle,
  loop 
)
The server listen on the port specified in const.py. 

Member Function Documentation

When a client tries to connect, the server adds him to the list and
creates a new task managing communications with this client.
def shared.network.NetworkServer.sendOrder (   self,
  ident,
  order 
)
Send an order to all connected clients by broadcasting messages to
all threads in the list.
Block until n clients are connected 

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions