C# 클래스 P2PStateServer.GetTransferMessage

Represents the GetTransferMessage message
The GetTransferMessage is broadcast to all connected peers when a peer wishes to receive a session resource from the network. The message is in turn forwarded to other peers that receive the message until tthe message traverses the network. If a peer receives this message and has the requested session resource, it proceeds to transfer the session resource to the peer that originated the broadcast. This message is only transmitted between peers.
상속: PeerMessage
파일 보기 프로젝트 열기: tenor/p2pStateServer

공개 메소드들

메소드 설명
Broadcast ( string OriginHost, List sockets, StateServer Service, string SessionKey, System.Guid MessageID, int MaxForwards, System.Guid BroadcastID ) : void

Sends a GetTransferMessage to a list of ServiceSockets

Broadcast ( string OriginHost, List sockets, StateServer Service, string SessionKey, System.Guid MessageID, int MaxForwards, System.Guid BroadcastID, System.DateTime TimeoutStamp, Action FoundAction, System TimeoutAction ) : void

Sends a GetTransferMessage to a list of ServiceSockets and queues an Action to be called if the requested session is transferred to this peer, and another Action to be called if no session is transferred after a set time.

Equals ( object obj ) : bool
Forward ( ) : void

Forwards this message to other peers on the network

GetHashCode ( ) : int
GetTransferMessage ( HTTPPartialData Data, StateServer Service ) : System

Initializes a new instance of the GetTransferMessage class

Process ( ) : void

Process the message

Rebroadcast ( ) : void

Rebroadcasts this message across the network. Rebroadcasts are different from Forwards because they have a different broadcast id and are also sent to the originating peer

비공개 메소드들

메소드 설명
CallExportEndedActions ( List Actions ) : void

Calls a list of Actions waiting to be processed after a session transfer is complete

CompleteTransferRequest ( ISessionObject Session, object StateObject ) : void

Called by the SessionDictionary.BeginExport method to complete processing the request, if the requested session was found and read

GetMergedHashCode ( System.Guid MessageID, System.Guid BroadcastID ) : int

Gets a hashcode value based on the combination of the message's ID and RebroadcastID

TransferFailure ( AsyncMessageTracker transferredMessage ) : void

Ends a failed Session Transfer

TransferSuccess ( AsyncMessageTracker transferredMessage ) : void

Ends a successful session transfer

메소드 상세

Broadcast() 공개 정적인 메소드

Sends a GetTransferMessage to a list of ServiceSockets
public static Broadcast ( string OriginHost, List sockets, StateServer Service, string SessionKey, System.Guid MessageID, int MaxForwards, System.Guid BroadcastID ) : void
OriginHost string The Host name of the peer that originally initiated this message
sockets List List of target ServiceSockets
Service StateServer Instance of state server
SessionKey string The requested session URI
MessageID System.Guid The unique message identifier
MaxForwards int The maximum number of nodes to forward the message to. This field is decremented by one for each forward
BroadcastID System.Guid The broadcast identifier. Used by peers to identify different broadcasts of the same message.
리턴 void

Broadcast() 공개 정적인 메소드

Sends a GetTransferMessage to a list of ServiceSockets and queues an Action to be called if the requested session is transferred to this peer, and another Action to be called if no session is transferred after a set time.
public static Broadcast ( string OriginHost, List sockets, StateServer Service, string SessionKey, System.Guid MessageID, int MaxForwards, System.Guid BroadcastID, System.DateTime TimeoutStamp, Action FoundAction, System TimeoutAction ) : void
OriginHost string The Host name of the peer that originally initiated this message
sockets List List of target ServiceSockets
Service StateServer Instance of state server
SessionKey string The requested session URI
MessageID System.Guid The unique message identifier
MaxForwards int The maximum number of nodes to forward the message to. This field is decremented by one for each forward
BroadcastID System.Guid The broadcast identifier. Used by peers to identify different broadcasts of the same message
TimeoutStamp System.DateTime The Time in UTC, at which point the message query is considered timed out
FoundAction Action The Action to be called if the requested session is transferred to this peer
TimeoutAction System The Action to be called if the requested session is not transferred to this peer after the TimeoutStamp time
리턴 void

Equals() 공개 메소드

public Equals ( object obj ) : bool
obj object
리턴 bool

Forward() 공개 메소드

Forwards this message to other peers on the network
public Forward ( ) : void
리턴 void

GetHashCode() 공개 메소드

public GetHashCode ( ) : int
리턴 int

GetTransferMessage() 공개 메소드

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

Process() 공개 메소드

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

Rebroadcast() 공개 메소드

Rebroadcasts this message across the network. Rebroadcasts are different from Forwards because they have a different broadcast id and are also sent to the originating peer
public Rebroadcast ( ) : void
리턴 void