C# 클래스 SuperSocket.SocketEngine.SocketSession

Socket Session, all application session should base on this class
상속: ISocketSession
파일 보기 프로젝트 열기: kerryjiang/SuperSocket

보호된 프로퍼티들

프로퍼티 타입 설명
SyncRoot object

Private Properties

프로퍼티 타입 설명
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

공개 메소드들

메소드 설명
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.

보호된 메소드들

메소드 설명
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

비공개 메소드들

메소드 설명
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.

메소드 상세

ApplySecureProtocol() 공개 추상적인 메소드

public abstract ApplySecureProtocol ( ) : void
리턴 void

Close() 공개 메소드

public Close ( CloseReason reason ) : void
reason CloseReason
리턴 void

GetUnderlyStream() 공개 메소드

public GetUnderlyStream ( ) : Stream
리턴 Stream

Initialize() 공개 메소드

public Initialize ( IAppSession appSession ) : void
appSession IAppSession
리턴 void

IsIgnorableException() 보호된 메소드

protected IsIgnorableException ( Exception e, int &socketErrorCode ) : bool
e System.Exception
socketErrorCode int
리턴 bool

IsIgnorableSocketError() 보호된 메소드

protected IsIgnorableSocketError ( int socketErrorCode ) : bool
socketErrorCode int
리턴 bool

OnClosed() 보호된 메소드

Called when [close].
protected OnClosed ( CloseReason reason ) : void
reason CloseReason
리턴 void

OnReceiveEnded() 보호된 메소드

protected OnReceiveEnded ( ) : void
리턴 void

OnReceiveError() 보호된 메소드

protected OnReceiveError ( CloseReason closeReason ) : void
closeReason CloseReason
리턴 void

OnReceiveStarted() 보호된 메소드

protected OnReceiveStarted ( ) : void
리턴 void

OnSendError() 보호된 메소드

protected OnSendError ( SendingQueue queue, CloseReason closeReason ) : void
queue SendingQueue
closeReason CloseReason
리턴 void

OnSendingCompleted() 보호된 메소드

protected OnSendingCompleted ( SendingQueue queue ) : void
queue SendingQueue
리턴 void

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

Sends in async mode.
protected abstract SendAsync ( SendingQueue queue ) : void
queue SendingQueue The queue.
리턴 void

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

Sends in sync mode.
protected abstract SendSync ( SendingQueue queue ) : void
queue SendingQueue The queue.
리턴 void

SocketSession() 공개 메소드

public SocketSession ( Socket client ) : System
client Socket
리턴 System

SocketSession() 공개 메소드

public SocketSession ( string sessionID ) : System
sessionID string
리턴 System

Start() 공개 추상적인 메소드

Starts this session.
public abstract Start ( ) : void
리턴 void

StartSession() 보호된 메소드

Says the welcome information when a client connectted.
protected StartSession ( ) : void
리턴 void

TrySend() 공개 메소드

Tries to send array segment.
public TrySend ( ArraySegment segment ) : bool
segment ArraySegment The segment.
리턴 bool

TrySend() 공개 메소드

Tries to send array segment.
public TrySend ( IList segments ) : bool
segments IList The segments.
리턴 bool

TryValidateClosedBySocket() 보호된 메소드

protected TryValidateClosedBySocket ( Socket &socket ) : bool
socket Socket
리턴 bool

프로퍼티 상세

SyncRoot 보호되어 있는 프로퍼티

protected object SyncRoot
리턴 object