C# Class DungeonServer.Server

This class represents the main console application
Inheritance: IHandleEvent
ファイルを表示 Open project: propra13-orga/gruppe22 Class Usage Examples

Public Properties

Property Type Description
_paused bool
error bool

Public Methods

Method Description
HandleEvent ( bool incoming, Events eventID ) : void
Main ( string args ) : void

Main method

ResetActors ( ) : void
Run ( ) : void
SendMessage ( PacketType type, NetConnection target ) : void
SendMessageToAll ( PacketType type, NetDeliveryMethod method, IPEndPoint exclude ) : void

Broadcast a message to all clients

Server ( string args ) : System

Private Methods

Method Description
Log ( string message, ConsoleColor color = ConsoleColor.White ) : void

Add text to log (in specified color)

ProcessMessage ( byte id, NetIncomingMessage message ) : void

Deal with an individual message

Update ( ) : void
WaitForInput ( ) : void

Main loop used for console UI

WorkMessages ( object param ) : void

Work on the message queue (reacting to all incoming messages)

Method Details

HandleEvent() public method

public HandleEvent ( bool incoming, Events eventID ) : void
incoming bool
eventID Events
return void

Main() public static method

Main method
public static Main ( string args ) : void
args string
return void

ResetActors() public method

public ResetActors ( ) : void
return void

Run() public method

public Run ( ) : void
return void

SendMessage() public method

public SendMessage ( PacketType type, NetConnection target ) : void
type PacketType
target Lidgren.Network.NetConnection
return void

SendMessageToAll() public method

Broadcast a message to all clients
public SendMessageToAll ( PacketType type, NetDeliveryMethod method, IPEndPoint exclude ) : void
type PacketType
method NetDeliveryMethod
exclude System.Net.IPEndPoint
return void

Server() public method

public Server ( string args ) : System
args string
return System

Property Details

_paused public_oe property

public bool _paused
return bool

error public_oe static_oe property

public static bool error
return bool