C# Класс Terrarium.PeerToPeer.NetworkEngine

The NetworkEngine which encapsulates all of the peer to peer functionality of the Terrarium application.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
NetworkBehindNatMessage string

Private Properties

Свойство Тип Описание
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

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

GetValueFromContent() публичный статический Метод

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.
Результат string

GetValuesFromContent() публичный статический Метод

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.
Результат System.Collections.ArrayList

StartHttpNamespaceManager() публичный Метод

Start the HTTP Listener used for Peer to Peer interaction.
public StartHttpNamespaceManager ( ) : void
Результат void

StopHttpNamespaceManager() публичный Метод

Stop the HTTP Listener used for Peer to Peer interaction.
public StopHttpNamespaceManager ( ) : void
Результат void

Описание свойств

NetworkBehindNatMessage публичное статическое свойство

Message to show if the user is detected to be behind a NAT
public static string NetworkBehindNatMessage
Результат string