C# Class P2PStateServer.ServiceMessage

Represents a message originating from a peer, state server or client (web server)
Inheritance: HTTPMessage
显示文件 Open project: tenor/p2pStateServer Class Usage Examples

Protected Properties

Property Type Description
lockCookie uint?
service StateServer
timeout int?

Public Methods

Method Description
Process ( ) : void

When overriden in a derived class, processes the message.

ServiceMessage ( HTTPPartialData HTTPData, StateServer Service ) : System

Initializes a new instance of the ServiceMessage class

Protected Methods

Method Description
GetKeyValue ( string Text, char Delimiter, string &Key, string &Value ) : void

Parses a string for a Key and a Value

IsValidBase64 ( string Data ) : bool

Verifies the supplied data is in valid Base64 format

Unquote ( string value ) : string

Removes quotes from a string if the string is surrounded by quotes

Validate ( ) : bool

Validates a message

Method Details

GetKeyValue() protected static method

Parses a string for a Key and a Value
protected static GetKeyValue ( string Text, char Delimiter, string &Key, string &Value ) : void
Text string The text to parse
Delimiter char Delimiter seperating key and value
Key string Key
Value string Value
return void

IsValidBase64() protected static method

Verifies the supplied data is in valid Base64 format
protected static IsValidBase64 ( string Data ) : bool
Data string Data to verify
return bool

Process() public abstract method

When overriden in a derived class, processes the message.
public abstract Process ( ) : void
return void

ServiceMessage() public method

Initializes a new instance of the ServiceMessage class
public ServiceMessage ( HTTPPartialData HTTPData, StateServer Service ) : System
HTTPData HTTPPartialData The HTTPPartialData class to load this instance from
Service StateServer State server instance
return System

Unquote() protected method

Removes quotes from a string if the string is surrounded by quotes
protected Unquote ( string value ) : string
value string Quoted/Unquoted string
return string

Validate() protected method

Validates a message
protected Validate ( ) : bool
return bool

Property Details

lockCookie protected_oe property

The message lock cookie value
protected uint? lockCookie
return uint?

service protected_oe property

An instance of the state server
protected StateServer service
return StateServer

timeout protected_oe property

The message time-out value
protected int? timeout
return int?