C# Class SuperSocket.SocketEngine.SocketSession

Socket Session, all application session should base on this class
Inheritance: ISocketSession
Afficher le fichier Open project: kerryjiang/SuperSocket

Protected Properties

Свойство Type Description
SyncRoot object

Private Properties

Свойство Type Description
AddStateFlag void
CheckState bool
FireCloseEvent void
GetCloseReasonFromState CloseReason
GetCloseReasonValue int
ISocketSession bool
InternalClose void
OnSendEnd void
OnSendEnd void
ProcessReceivedData System.ProcessResult
RemoveStateFlag void
Send void
StartSend void
TryAddStateFlag bool
ValidateClosed void
ValidateNotInSendingReceiving bool

Méthodes publiques

Méthode Description
ApplySecureProtocol ( ) : void
Close ( CloseReason reason ) : void
GetUnderlyStream ( ) : Stream
Initialize ( IAppSession appSession ) : void
SocketSession ( Socket client ) : System
SocketSession ( string sessionID ) : System
Start ( ) : void

Starts this session.

TrySend ( ArraySegment segment ) : bool

Tries to send array segment.

TrySend ( IList segments ) : bool

Tries to send array segment.

Méthodes protégées

Méthode Description
IsIgnorableException ( Exception e, int &socketErrorCode ) : bool
IsIgnorableSocketError ( int socketErrorCode ) : bool
OnClosed ( CloseReason reason ) : void

Called when [close].

OnReceiveEnded ( ) : void
OnReceiveError ( CloseReason closeReason ) : void
OnReceiveStarted ( ) : void
OnSendError ( SendingQueue queue, CloseReason closeReason ) : void
OnSendingCompleted ( SendingQueue queue ) : void
SendAsync ( SendingQueue queue ) : void

Sends in async mode.

SendSync ( SendingQueue queue ) : void

Sends in sync mode.

StartSession ( ) : void

Says the welcome information when a client connectted.

TryValidateClosedBySocket ( Socket &socket ) : bool

Private Methods

Méthode Description
AddStateFlag ( int stateValue ) : void
CheckState ( int stateValue ) : bool
FireCloseEvent ( ) : void
GetCloseReasonFromState ( ) : CloseReason
GetCloseReasonValue ( CloseReason reason ) : int
ISocketSession ( ) : bool
InternalClose ( Socket client, CloseReason reason, bool setCloseReason ) : void
OnSendEnd ( ) : void
OnSendEnd ( bool isInClosingOrClosed ) : void
ProcessReceivedData ( ArraySegment data, IBufferState state ) : System.ProcessResult
RemoveStateFlag ( int stateValue ) : void
Send ( SendingQueue queue ) : void
StartSend ( SendingQueue queue, int sendingTrackID, bool initial ) : void
TryAddStateFlag ( int stateValue ) : bool
ValidateClosed ( CloseReason closeReason ) : void
ValidateNotInSendingReceiving ( ) : bool

Validates the socket is not in the sending or receiving operation.

Method Details

ApplySecureProtocol() public abstract méthode

public abstract ApplySecureProtocol ( ) : void
Résultat void

Close() public méthode

public Close ( CloseReason reason ) : void
reason CloseReason
Résultat void

GetUnderlyStream() public méthode

public GetUnderlyStream ( ) : Stream
Résultat Stream

Initialize() public méthode

public Initialize ( IAppSession appSession ) : void
appSession IAppSession
Résultat void

IsIgnorableException() protected méthode

protected IsIgnorableException ( Exception e, int &socketErrorCode ) : bool
e System.Exception
socketErrorCode int
Résultat bool

IsIgnorableSocketError() protected méthode

protected IsIgnorableSocketError ( int socketErrorCode ) : bool
socketErrorCode int
Résultat bool

OnClosed() protected méthode

Called when [close].
protected OnClosed ( CloseReason reason ) : void
reason CloseReason
Résultat void

OnReceiveEnded() protected méthode

protected OnReceiveEnded ( ) : void
Résultat void

OnReceiveError() protected méthode

protected OnReceiveError ( CloseReason closeReason ) : void
closeReason CloseReason
Résultat void

OnReceiveStarted() protected méthode

protected OnReceiveStarted ( ) : void
Résultat void

OnSendError() protected méthode

protected OnSendError ( SendingQueue queue, CloseReason closeReason ) : void
queue SendingQueue
closeReason CloseReason
Résultat void

OnSendingCompleted() protected méthode

protected OnSendingCompleted ( SendingQueue queue ) : void
queue SendingQueue
Résultat void

SendAsync() protected abstract méthode

Sends in async mode.
protected abstract SendAsync ( SendingQueue queue ) : void
queue SendingQueue The queue.
Résultat void

SendSync() protected abstract méthode

Sends in sync mode.
protected abstract SendSync ( SendingQueue queue ) : void
queue SendingQueue The queue.
Résultat void

SocketSession() public méthode

public SocketSession ( Socket client ) : System
client Socket
Résultat System

SocketSession() public méthode

public SocketSession ( string sessionID ) : System
sessionID string
Résultat System

Start() public abstract méthode

Starts this session.
public abstract Start ( ) : void
Résultat void

StartSession() protected méthode

Says the welcome information when a client connectted.
protected StartSession ( ) : void
Résultat void

TrySend() public méthode

Tries to send array segment.
public TrySend ( ArraySegment segment ) : bool
segment ArraySegment The segment.
Résultat bool

TrySend() public méthode

Tries to send array segment.
public TrySend ( IList segments ) : bool
segments IList The segments.
Résultat bool

TryValidateClosedBySocket() protected méthode

protected TryValidateClosedBySocket ( Socket &socket ) : bool
socket Socket
Résultat bool

Property Details

SyncRoot protected_oe property

protected object SyncRoot
Résultat object