C# Class P2PStateServer.SessionObject

Represents a stored session
Inheritance: ISessionObject
Mostra file Open project: tenor/p2pStateServer Class Usage Examples

Public Methods

Method Description
CompareExchangeIsInUse ( bool Value, bool Comparand ) : bool

Performs an atomic compare exchange on the IsInuse property

CopyFrom ( ISessionObject ObjectToCopy ) : void

Copies all data from one Session object to this one

CreateResponseInfo ( ) : ISessionResponseInfo

Initializes a new SessionResponseInfo object filled with information from this session

Lock ( ) : void

Locks a session

ResetTimeout ( ) : void

Resets the session timeout thus extending the lifespan of the session by the value of the session's timeout

SessionObject ( SetRequest Message ) : System

Initializes a new instance of the SessionObject class

SessionObject ( SetTransferRequest Message ) : System

Initializes a new instance of the SessionObject class

UnLock ( uint LockCookie ) : bool

Unlocks a locked session using the provided LockCookie value

The LockCookie value must match the session lock cookie value to perform the unlock

Method Details

CompareExchangeIsInUse() public method

Performs an atomic compare exchange on the IsInuse property
public CompareExchangeIsInUse ( bool Value, bool Comparand ) : bool
Value bool The value to set IsInUse with if the compare matches
Comparand bool The value to compare IsInUse with
return bool

CopyFrom() public method

Copies all data from one Session object to this one
public CopyFrom ( ISessionObject ObjectToCopy ) : void
ObjectToCopy ISessionObject Session object to copy from
return void

CreateResponseInfo() public method

Initializes a new SessionResponseInfo object filled with information from this session
public CreateResponseInfo ( ) : ISessionResponseInfo
return ISessionResponseInfo

Lock() public method

Locks a session
public Lock ( ) : void
return void

ResetTimeout() public method

Resets the session timeout thus extending the lifespan of the session by the value of the session's timeout
public ResetTimeout ( ) : void
return void

SessionObject() public method

Initializes a new instance of the SessionObject class
public SessionObject ( SetRequest Message ) : System
Message SetRequest The SetRequest Message to initialize fields from
return System

SessionObject() public method

Initializes a new instance of the SessionObject class
public SessionObject ( SetTransferRequest Message ) : System
Message SetTransferRequest The SetTransferRequest Message to initialize fields from
return System

UnLock() public method

Unlocks a locked session using the provided LockCookie value
The LockCookie value must match the session lock cookie value to perform the unlock
public UnLock ( uint LockCookie ) : bool
LockCookie uint The Lock-Cookie value
return bool