C# Class System.Net.CommandStream

Inheritance: PooledStream
Afficher le fichier Open project: dotnet/corefx Class Usage Examples

Protected Properties

Свойство Type Description
_abortReason string
_commands PipelineEntry[]
_index int
_isAsync bool
_request WebRequest

Private Properties

Свойство Type Description
Abort void
CheckContinuePipeline void
CommandStream System.IO
PostReadCommandProcessing bool
PostSendCommandProcessing bool
ReadCallback void
ReceiveCommandResponse ResponseDescription
ReceiveCommandResponseCallback void
SubmitRequest Stream
WriteCallback void

Méthodes protégées

Méthode Description
BuildCommandsList ( WebRequest request ) : PipelineEntry[]
CheckValid ( ResponseDescription response, int &validThrough, int &completeLength ) : bool

This function is implemented in a derived class to determine whether a response is valid, and when it is complete.

ClearState ( ) : void
ContinueCommandPipeline ( ) : Stream
Dispose ( bool disposing ) : void
GenerateException ( FtpStatusCode code, string statusDescription, Exception innerException ) : Exception
GenerateException ( string message, WebExceptionStatus status, Exception innerException ) : Exception
InitCommandPipeline ( WebRequest request, PipelineEntry commands, bool isAsync ) : void
InvokeRequestCallback ( object obj ) : void
MarkAsRecoverableFailure ( ) : void
PipelineCallback ( PipelineEntry entry, ResponseDescription response, bool timeout, Stream &stream ) : PipelineInstruction

Private Methods

Méthode Description
Abort ( Exception e ) : void
CheckContinuePipeline ( ) : void
CommandStream ( TcpClient client ) : System.IO
PostReadCommandProcessing ( Stream &stream ) : bool
PostSendCommandProcessing ( Stream &stream ) : bool
ReadCallback ( IAsyncResult asyncResult ) : void
ReceiveCommandResponse ( ) : ResponseDescription

Kicks off an asynchronous or sync request to receive a response from the server. Uses the Encoding encoding to transform the bytes received into a string to be returned in the GeneralResponseDescription's StatusDescription field.

ReceiveCommandResponseCallback ( ReceiveState state, int bytesRead ) : void

ReceiveCommandResponseCallback is the main "while loop" of the ReceiveCommandResponse function family. In general, what is does is perform an EndReceive() to complete the previous retrieval of bytes from the server (unless it is using a buffered response) It then processes what is received by using the implementing class's CheckValid() function, as described above. If the response is complete, it returns the single complete response in the GeneralResponseDescription created in BeginReceiveComamndResponse, and buffers the rest as described above. If the response is not complete, it issues another Connection.BeginReceive, with callback ReceiveCommandResponse2, so the action will continue at the next invocation of ReceiveCommandResponse2.

SubmitRequest ( WebRequest request, bool isAsync, bool readInitalResponseOnConnect ) : Stream
WriteCallback ( IAsyncResult asyncResult ) : void

Method Details

BuildCommandsList() protected méthode

protected BuildCommandsList ( WebRequest request ) : PipelineEntry[]
request WebRequest
Résultat PipelineEntry[]

CheckValid() protected méthode

This function is implemented in a derived class to determine whether a response is valid, and when it is complete.
protected CheckValid ( ResponseDescription response, int &validThrough, int &completeLength ) : bool
response ResponseDescription
validThrough int
completeLength int
Résultat bool

ClearState() protected méthode

protected ClearState ( ) : void
Résultat void

ContinueCommandPipeline() protected méthode

protected ContinueCommandPipeline ( ) : Stream
Résultat Stream

Dispose() protected méthode

protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

GenerateException() protected méthode

protected GenerateException ( FtpStatusCode code, string statusDescription, Exception innerException ) : Exception
code FtpStatusCode
statusDescription string
innerException System.Exception
Résultat System.Exception

GenerateException() protected méthode

protected GenerateException ( string message, WebExceptionStatus status, Exception innerException ) : Exception
message string
status WebExceptionStatus
innerException System.Exception
Résultat System.Exception

InitCommandPipeline() protected méthode

protected InitCommandPipeline ( WebRequest request, PipelineEntry commands, bool isAsync ) : void
request WebRequest
commands PipelineEntry
isAsync bool
Résultat void

InvokeRequestCallback() protected méthode

protected InvokeRequestCallback ( object obj ) : void
obj object
Résultat void

MarkAsRecoverableFailure() protected méthode

protected MarkAsRecoverableFailure ( ) : void
Résultat void

PipelineCallback() protected méthode

protected PipelineCallback ( PipelineEntry entry, ResponseDescription response, bool timeout, Stream &stream ) : PipelineInstruction
entry PipelineEntry
response ResponseDescription
timeout bool
stream Stream
Résultat PipelineInstruction

Property Details

_abortReason protected_oe property

protected string _abortReason
Résultat string

_commands protected_oe property

protected PipelineEntry[] _commands
Résultat PipelineEntry[]

_index protected_oe property

protected int _index
Résultat int

_isAsync protected_oe property

protected bool _isAsync
Résultat bool

_request protected_oe property

protected WebRequest,System.Net _request
Résultat WebRequest