C# Class Terrarium.PeerToPeer.NetworkEngine

The NetworkEngine which encapsulates all of the peer to peer functionality of the Terrarium application.
Datei anzeigen Open project: eugeniomiro/Terrarium Class Usage Examples

Public Properties

Property Type Description
NetworkBehindNatMessage string

Private Properties

Property Type Description
AfterProcessRequest void
AnnounceAndRegisterPeer void
BeforeProcessRequest void
CountFailedTeleportationReceives void
CountFailedTeleportationSends void
CountLocalTeleportation void
CountRemoteTeleportation void
GetAllPeersFromConfig System.Data.DataSet
GetNetworkStatistics string
GetNumPeersFromConfig int
InitializeNetwork void
SetHostIPInformation void
ShutdownNetwork void
Teleport void
TeleportCallback void
ValidatePeer bool
WriteProtocolInfo void

Public Methods

Method Description
GetValueFromContent ( string startTag, string endTag, string content ) : string

Simple way to parse an XML tag for content. Doesn't confirm that the file is valid XML

GetValuesFromContent ( string startTag, string endTag, string content ) : ArrayList

Retrieves a collection of values delimited by tags from content. Doesn't confirm that the file is valid XML.

StartHttpNamespaceManager ( ) : void

Start the HTTP Listener used for Peer to Peer interaction.

StopHttpNamespaceManager ( ) : void

Stop the HTTP Listener used for Peer to Peer interaction.

Private Methods

Method Description
AfterProcessRequest ( object sender, EventArgs e ) : void

Called when the HTTP listener is done processing a request

AnnounceAndRegisterPeer ( ) : void
BeforeProcessRequest ( object sender, EventArgs e ) : void

Called when the HTTP listener starts to process a request

CountFailedTeleportationReceives ( ) : void
CountFailedTeleportationSends ( ) : void
CountLocalTeleportation ( ) : void
CountRemoteTeleportation ( ) : void
GetAllPeersFromConfig ( string channel ) : DataSet
GetNetworkStatistics ( ) : string
GetNumPeersFromConfig ( string channel ) : int
InitializeNetwork ( string peerChannel, Terrarium.Forms.TerrariumLed leds ) : void
SetHostIPInformation ( ) : void
ShutdownNetwork ( ) : void
Teleport ( TeleportState state ) : void
TeleportCallback ( IAsyncResult ar ) : void
ValidatePeer ( string ipAddress ) : bool

Figure out if our local DNS thinks the passed in ipAddress is valid for us.

WriteProtocolInfo ( string output ) : void

Method Details

GetValueFromContent() public static method

Simple way to parse an XML tag for content. Doesn't confirm that the file is valid XML
public static GetValueFromContent ( string startTag, string endTag, string content ) : string
startTag string The start tag
endTag string The end tag
content string The content to be parsed.
return string

GetValuesFromContent() public static method

Retrieves a collection of values delimited by tags from content. Doesn't confirm that the file is valid XML.
public static GetValuesFromContent ( string startTag, string endTag, string content ) : ArrayList
startTag string The start tag.
endTag string The end tag.
content string The content to parse.
return System.Collections.ArrayList

StartHttpNamespaceManager() public method

Start the HTTP Listener used for Peer to Peer interaction.
public StartHttpNamespaceManager ( ) : void
return void

StopHttpNamespaceManager() public method

Stop the HTTP Listener used for Peer to Peer interaction.
public StopHttpNamespaceManager ( ) : void
return void

Property Details

NetworkBehindNatMessage public_oe static_oe property

Message to show if the user is detected to be behind a NAT
public static string NetworkBehindNatMessage
return string