C# Класс System.Net.CommandStream

Наследование: PooledStream
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
_abortReason string
_commands PipelineEntry[]
_index int
_isAsync bool
_request WebRequest

Private Properties

Свойство Тип Описание
Abort void
CheckContinuePipeline void
CommandStream System.IO
PostReadCommandProcessing bool
PostSendCommandProcessing bool
ReadCallback void
ReceiveCommandResponse ResponseDescription
ReceiveCommandResponseCallback void
SubmitRequest Stream
WriteCallback void

Защищенные методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

BuildCommandsList() защищенный метод

protected BuildCommandsList ( WebRequest request ) : PipelineEntry[]
request WebRequest
Результат PipelineEntry[]

CheckValid() защищенный метод

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
Результат bool

ClearState() защищенный метод

protected ClearState ( ) : void
Результат void

ContinueCommandPipeline() защищенный метод

protected ContinueCommandPipeline ( ) : Stream
Результат Stream

Dispose() защищенный метод

protected Dispose ( bool disposing ) : void
disposing bool
Результат void

GenerateException() защищенный метод

protected GenerateException ( FtpStatusCode code, string statusDescription, Exception innerException ) : Exception
code FtpStatusCode
statusDescription string
innerException System.Exception
Результат System.Exception

GenerateException() защищенный метод

protected GenerateException ( string message, WebExceptionStatus status, Exception innerException ) : Exception
message string
status WebExceptionStatus
innerException System.Exception
Результат System.Exception

InitCommandPipeline() защищенный метод

protected InitCommandPipeline ( WebRequest request, PipelineEntry commands, bool isAsync ) : void
request WebRequest
commands PipelineEntry
isAsync bool
Результат void

InvokeRequestCallback() защищенный метод

protected InvokeRequestCallback ( object obj ) : void
obj object
Результат void

MarkAsRecoverableFailure() защищенный метод

protected MarkAsRecoverableFailure ( ) : void
Результат void

PipelineCallback() защищенный метод

protected PipelineCallback ( PipelineEntry entry, ResponseDescription response, bool timeout, Stream &stream ) : PipelineInstruction
entry PipelineEntry
response ResponseDescription
timeout bool
stream Stream
Результат PipelineInstruction

Описание свойств

_abortReason защищенное свойство

protected string _abortReason
Результат string

_commands защищенное свойство

protected PipelineEntry[] _commands
Результат PipelineEntry[]

_index защищенное свойство

protected int _index
Результат int

_isAsync защищенное свойство

protected bool _isAsync
Результат bool

_request защищенное свойство

protected WebRequest,System.Net _request
Результат WebRequest