Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.Net.CommandStream Class Reference

Classes

class  PipelineEntry
 

Public Member Functions

override long Seek (long offset, SeekOrigin origin)
 
override int Read (byte[] buffer, int offset, int size)
 
virtual int Read (Span< byte > buffer)
 
override void Write (byte[] buffer, int offset, int size)
 
virtual void Write (ReadOnlySpan< byte > buffer)
 
void Dispose ()
 
void Close (int timeout)
 
virtual void Close ()
 
override IAsyncResult BeginRead (byte[] buffer, int offset, int size, AsyncCallback callback, object state)
 
virtual IAsyncResult BeginRead (byte[] buffer, int offset, int count, AsyncCallback? callback, object? state)
 
override int EndRead (IAsyncResult asyncResult)
 
override Task< int > ReadAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken)
 
override ValueTask< int > ReadAsync (Memory< byte > buffer, CancellationToken cancellationToken=default(CancellationToken))
 
Task< int > ReadAsync (byte[] buffer, int offset, int count)
 
override IAsyncResult BeginWrite (byte[] buffer, int offset, int size, AsyncCallback callback, object state)
 
virtual IAsyncResult BeginWrite (byte[] buffer, int offset, int count, AsyncCallback? callback, object? state)
 
override void EndWrite (IAsyncResult asyncResult)
 
override Task WriteAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken)
 
override ValueTask WriteAsync (ReadOnlyMemory< byte > buffer, CancellationToken cancellationToken=default(CancellationToken))
 
Task WriteAsync (byte[] buffer, int offset, int count)
 
override void Flush ()
 
override Task FlushAsync (CancellationToken cancellationToken)
 
Task FlushAsync ()
 
override void SetLength (long value)
 
void CopyTo (Stream destination)
 
virtual void CopyTo (Stream destination, int bufferSize)
 
Task CopyToAsync (Stream destination)
 
Task CopyToAsync (Stream destination, int bufferSize)
 
Task CopyToAsync (Stream destination, CancellationToken cancellationToken)
 
virtual Task CopyToAsync (Stream destination, int bufferSize, CancellationToken cancellationToken)
 
virtual ValueTask DisposeAsync ()
 
virtual int ReadByte ()
 
virtual void WriteByte (byte value)
 
object GetLifetimeService ()
 
virtual object InitializeLifetimeService ()
 

Static Public Member Functions

static Stream Synchronized (Stream stream)
 

Static Public Attributes

static readonly Stream Null = new NullStream()
 

Protected Member Functions

override void Dispose (bool disposing)
 
void InvokeRequestCallback (object obj)
 
void MarkAsRecoverableFailure ()
 
virtual void ClearState ()
 
virtual PipelineEntry[] BuildCommandsList (WebRequest request)
 
Exception GenerateException (string message, WebExceptionStatus status, Exception innerException)
 
Exception GenerateException (FtpStatusCode code, string statusDescription, Exception innerException)
 
void InitCommandPipeline (WebRequest request, PipelineEntry[] commands, bool isAsync)
 
Stream ContinueCommandPipeline ()
 
virtual PipelineInstruction PipelineCallback (PipelineEntry entry, ResponseDescription response, bool timeout, ref Stream stream)
 
virtual bool CheckValid (ResponseDescription response, ref int validThrough, ref int completeLength)
 
SemaphoreSlim EnsureAsyncActiveSemaphoreInitialized ()
 
virtual WaitHandle CreateWaitHandle ()
 
virtual void ObjectInvariant ()
 
MarshalByRefObject MemberwiseClone (bool cloneIdentity)
 

Static Protected Member Functions

static void ValidateBufferArguments (byte[] buffer, int offset, int count)
 
static void ValidateCopyToArguments (Stream destination, int bufferSize)
 

Protected Attributes

WebRequest _request
 
bool _isAsync
 
PipelineEntry[] _commands
 
int _index
 
string _abortReason
 
SemaphoreSlim _asyncActiveSemaphore
 

Package Types

enum  PipelineInstruction {
  Abort , Advance , Pause , Reread ,
  GiveStream
}
 
enum  PipelineEntryFlags { UserCommand = 1 , GiveDataStream = 2 , CreateDataConnection = 4 , DontLogParameter = 8 }
 

Package Functions

 CommandStream (TcpClient client)
 
virtual void Abort (Exception e)
 
Stream SubmitRequest (WebRequest request, bool isAsync, bool readInitalResponseOnConnect)
 
void CheckContinuePipeline ()
 
void CloseSocket ()
 
void SetSocketTimeoutOption (int timeout)
 
Task< int > BeginReadInternal (byte[] buffer, int offset, int count, AsyncCallback callback, object state, bool serializeAsynchronously, bool apm)
 
Task BeginWriteInternal (byte[] buffer, int offset, int count, AsyncCallback callback, object state, bool serializeAsynchronously, bool apm)
 

Properties

bool RecoverableFailure [get]
 
Encoding Encoding [get, set]
 
bool UsingSecureStream [get]
 
IPAddress ServerAddress [get]
 
Socket Socket [get]
 
NetworkStream NetworkStream [get, set]
 
override bool CanRead [get]
 
override bool CanSeek [get]
 
override bool CanWrite [get]
 
override bool CanTimeout [get]
 
override int ReadTimeout [get, set]
 
override int WriteTimeout [get, set]
 
override long Length [get]
 
override long Position [get, set]
 

Private Member Functions

bool PostSendCommandProcessing (ref Stream stream)
 
bool PostReadCommandProcessing (ref Stream stream)
 
ResponseDescription ReceiveCommandResponse ()
 
void ReceiveCommandResponseCallback (ReceiveState state, int bytesRead)
 
bool HasOverriddenBeginEndRead ()
 
bool HasOverriddenBeginEndWrite ()
 
int GetCopyBufferSize ()
 
Task< int > BeginEndReadAsync (byte[] buffer, int offset, int count)
 
void FinishTrackingAsyncOperation (ReadWriteTask task)
 
Task BeginEndWriteAsync (byte[] buffer, int offset, int count)
 

Static Private Member Functions

static void ReadCallback (IAsyncResult asyncResult)
 
static void WriteCallback (IAsyncResult asyncResult)
 
static void RunReadWriteTaskWhenReady (Task asyncWaiter, ReadWriteTask readWriteTask)
 
static void RunReadWriteTask (ReadWriteTask readWriteTask)
 
static async Task FinishWriteAsync (Task writeTask, byte[] localBuffer)
 

Private Attributes

bool _recoverableFailure
 
bool _aborted
 
bool _doRead
 
bool _doSend
 
ResponseDescription _currentResponseDescription
 
string _buffer = string.Empty
 
Encoding _encoding = Encoding.UTF8
 
Decoder _decoder
 
readonly TcpClient _client
 
NetworkStream _networkStream
 

Static Private Attributes

static readonly AsyncCallback s_writeCallbackDelegate = WriteCallback
 
static readonly AsyncCallback s_readCallbackDelegate = ReadCallback
 

Detailed Description

Definition at line 7 of file CommandStream.cs.


The documentation for this class was generated from the following file: