C# 클래스 P2PStateServer.ServiceRequest

Represents a ServiceRequest message
The ServiceRequest class represents a request message from a peer to another or from a client to a state server. Request messages should be derived from the ServiceRequest class.
상속: ServiceMessage
파일 보기 프로젝트 열기: tenor/p2pStateServer

보호된 프로퍼티들

프로퍼티 타입 설명
extraFlags string
queryTimeout DateTime?

공개 메소드들

메소드 설명
Reply ( ResponseData Response ) : void

Sends a reply to the source of this request

ServiceRequest ( HTTPPartialData Data, StateServer Service ) : System

Initializes a new instance of the ServiceRequest class

보호된 메소드들

메소드 설명
BuildResponse ( Type ResponseType, string ResponseMessage, ISessionResponseInfo ResponseInfo, byte Content ) : ResponseData

When overriden in a derived class, Generates an appropriate ResponseData object for this message, filled with supplied data

MergeResponseData ( StringBuilder Headers, byte Content, bool AppendContent, bool EncryptContent, SHA256_AESAuthenticator Authenticator, byte SessionKey ) : byte[]

Generates a raw response message data

QueryNetwork ( ) : bool

Initiates a network query for a session

QueryNetwork ( System TimeoutHandler ) : bool

Initiates a network query for a session

Validate ( ) : bool

Validates a ServiceRequest message

메소드 상세

BuildResponse() 보호된 추상적인 메소드

When overriden in a derived class, Generates an appropriate ResponseData object for this message, filled with supplied data
protected abstract BuildResponse ( Type ResponseType, string ResponseMessage, ISessionResponseInfo ResponseInfo, byte Content ) : ResponseData
ResponseType System.Type The Type of the Response message
ResponseMessage string The HTTP response reason phrase
ResponseInfo ISessionResponseInfo The session response information
Content byte The response data
리턴 ResponseData

MergeResponseData() 보호된 정적인 메소드

Generates a raw response message data
protected static MergeResponseData ( StringBuilder Headers, byte Content, bool AppendContent, bool EncryptContent, SHA256_AESAuthenticator Authenticator, byte SessionKey ) : byte[]
Headers StringBuilder The HTTP Headers (includes first line)
Content byte The Content (message body)
AppendContent bool Specifies whether the content is to be included in the generated message
EncryptContent bool Specifies whether the content is to be encrypted
Authenticator SHA256_AESAuthenticator The Authenticator object
SessionKey byte The session encryption key
리턴 byte[]

QueryNetwork() 보호된 메소드

Initiates a network query for a session
protected QueryNetwork ( ) : bool
리턴 bool

QueryNetwork() 보호된 메소드

Initiates a network query for a session
protected QueryNetwork ( System TimeoutHandler ) : bool
TimeoutHandler System The Action that is called when the query times out
리턴 bool

Reply() 공개 메소드

Sends a reply to the source of this request
public Reply ( ResponseData Response ) : void
Response ResponseData The response data
리턴 void

ServiceRequest() 공개 메소드

Initializes a new instance of the ServiceRequest class
public ServiceRequest ( HTTPPartialData Data, StateServer Service ) : System
Data HTTPPartialData The HTTPPartialData class to load this instance from
Service StateServer State server instance
리턴 System

Validate() 보호된 메소드

Validates a ServiceRequest message
protected Validate ( ) : bool
리턴 bool

프로퍼티 상세

extraFlags 보호되어 있는 프로퍼티

The request ExtraFlags value
protected string extraFlags
리턴 string

queryTimeout 보호되어 있는 프로퍼티

The time out datestamp for a network query
protected DateTime? queryTimeout
리턴 DateTime?