ForgeDocs
Documentation for the forge framework
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
Package Forge.Networking.Core

Classes

class  Configuration
 This class contains Lidgren.Network configuration settings that are used when creating NetPeer (typically either a NetServer or a NetClient type) instances.
 
interface  INetworkConnectionMonitor
 Object that monitors the connection and disconnection of other computers. More...
 
interface  INetworkMessage
 A message transmitted over the network. Network messages are always transmitted in order and reliably. More...
 
interface  INetworkMessageHandler
 Client code that is executed upon the receipt of a network message. More...
 
class  BaseNetworkMessageHandler< TNetworkMessage >
 Base type that all INetworkMessageHandlers should extend from (for a simplified API). More...
 
class  NetworkContext
 Holds important information about the current network connection and additionally about INetworkMessage listeners. More...
 
class  NetworkMessageDispatcher
 This class serves as a registry for INetworkMessageHandlers. It supports efficient lookup of message type to message handler responders.
 
class  ServerDiscoveryFormat
 
struct  DiscoveredServer
 Contains information about a running server. More...
 
class  NetworkServerDiscovery
 This class makes it simple to automatically discover servers that are running on the local network.
 
class  Player
 A network player is an abstraction over a network connection. More...
 

Enumerations

enum  NetworkMessageRecipient { NetworkMessageRecipient.All, NetworkMessageRecipient.Server, NetworkMessageRecipient.Clients }
 Specifies which computers an INetworkMessage should be delivered to. More...
 

Enumeration Type Documentation

Specifies which computers an INetworkMessage should be delivered to.

Enumerator
All 

All computers process the message. Each computer will processes each message in the same order. That is, computer A sends message A, and computer B sends message B, both computers will process both messages in the same order (whether it be A then B or B then A is undefined, but both computers will select the same (a,b) or (b,a) group).

In regards to implementation details, this message type requires that the message be sent to the server before any computer can process it (for ordering purposes). The server then rebroadcasts the message to every computer for execution. This is not particularly lightweight, but it does simplify networking logic.

Server 

The message should be processed by only the server. This message type can only be sent by any computer in the network, whether it be a client or a server.

Clients 

The message should be processed by all clients but not the server. This message type can only be sent by the server.