C# 클래스 P2PStateServer.BeginAuthRequest

Represents the BeginAuthRequest message
The BeginAuthRequest message is sent to initiate the authentication process. The authentication process is outlined below: 1. Peer A --- BeginAuthRequest ---) Peer B (Peer A wishes to authenticate with Peer B) 2. Peer A (--- UnauthorizedResponse ---- Peer B (Peer B sends a challenge to Peer A) 3. Peer A --- CompleteAuthRequest --) Peer B (Peer A calculates the digest and includes a challenge to Peer B) 4. Peer A (--- OKResponse --- Peer B (Peer B verifies Peer A's digest, authenticates Peer A and send digest for Peer A's challenge) 5. Peer A Peer B (peer A verifies Peer B's digest and authenticates peer B) If Peer B cannot verify Peer A's digest at step 4, Peer B sends an UnauthorizedResponse. If Peer A cannot verify Peer B's digest at step 5. Peer A disconnects the connection. As always, if Peer B stops responding at anytime, the authentication process times out at Peer A. This message is only transmitted between peers.
상속: ServiceRequest
파일 보기 프로젝트 열기: tenor/p2pStateServer

공개 메소드들

메소드 설명
BeginAuthRequest ( HTTPPartialData Data, StateServer Service ) : System

Initializes a new instance of the BeginAuthRequest class

Process ( ) : void

Process the message

Send ( ServiceSocket socket, StateServer Service, Action SuccessAction, Action FailAction, System TimeoutAction, System.TimeSpan Timeout ) : void

Sends a BeginAuthRequest message to a specified ServiceSocket

보호된 메소드들

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

Generates an appropriate ResponseData object for this message, filled with supplied data

메소드 상세

BeginAuthRequest() 공개 메소드

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

BuildResponse() 보호된 메소드

Generates an appropriate ResponseData object for this message, filled with supplied data
protected 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

Process() 공개 메소드

Process the message
public Process ( ) : void
리턴 void

Send() 공개 정적인 메소드

Sends a BeginAuthRequest message to a specified ServiceSocket
public static Send ( ServiceSocket socket, StateServer Service, Action SuccessAction, Action FailAction, System TimeoutAction, System.TimeSpan Timeout ) : void
socket ServiceSocket The target ServiceSocket
Service StateServer The state server instance
SuccessAction Action The Action to call if the message was accepted
FailAction Action The Action to call if the message transmission failed or was refused
TimeoutAction System The Action to call if the transfer timed out This Action's processing time should be very short because a long list of Timeout actions can be daisy-chained and called one after the other
Timeout System.TimeSpan The timeout time span
리턴 void