C# Class System.Net.Sockets.NetworkStream

Inheritance: System.IO.Stream, IDisposable
显示文件 Open project: dotnet/corefx Class Usage Examples

Private Properties

Property Type Description
ConvertToNotSocketOwner void
CopyToAsyncCore System.Threading.Task
DebugMembers void
InternalAbortSocket void
NetworkStream System.Buffers
Poll bool
PollRead bool
SetSocketTimeoutOption void
UnsafeBeginRead IAsyncResult
UnsafeBeginWrite IAsyncResult

Public Methods

Method Description
BeginRead ( byte buffer, int offset, int size, AsyncCallback callback, Object state ) : IAsyncResult
BeginWrite ( byte buffer, int offset, int size, AsyncCallback callback, Object state ) : IAsyncResult
Close ( int timeout ) : void
CopyToAsync ( Stream destination, int bufferSize, CancellationToken cancellationToken ) : System.Threading.Task
EndRead ( IAsyncResult asyncResult ) : int
EndWrite ( IAsyncResult asyncResult ) : void
Flush ( ) : void
FlushAsync ( CancellationToken cancellationToken ) : System.Threading.Task
NetworkStream ( Socket socket ) : System.Buffers
NetworkStream ( Socket socket, FileAccess access ) : System.Buffers
NetworkStream ( Socket socket, FileAccess access, bool ownsSocket ) : System.Buffers
NetworkStream ( Socket socket, bool ownsSocket ) : System.Buffers
Read ( byte buffer, int offset, int size ) : int
ReadAsync ( byte buffer, int offset, int size, CancellationToken cancellationToken ) : Task
Seek ( long offset, SeekOrigin origin ) : long
SetLength ( long value ) : void
Write ( byte buffer, int offset, int size ) : void
WriteAsync ( byte buffer, int offset, int size, CancellationToken cancellationToken ) : System.Threading.Task

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Private Methods

Method Description
ConvertToNotSocketOwner ( ) : void
CopyToAsyncCore ( Stream destination, AwaitableSocketAsyncEventArgs ea, CancellationToken cancellationToken ) : System.Threading.Task
DebugMembers ( ) : void
InternalAbortSocket ( ) : void
NetworkStream ( ) : System.Buffers
Poll ( int microSeconds, SelectMode mode ) : bool
PollRead ( ) : bool
SetSocketTimeoutOption ( SocketShutdown mode, int timeout, bool silent ) : void
UnsafeBeginRead ( byte buffer, int offset, int size, AsyncCallback callback, Object state ) : IAsyncResult
UnsafeBeginWrite ( byte buffer, int offset, int size, AsyncCallback callback, Object state ) : IAsyncResult

Method Details

BeginRead() public method

public BeginRead ( byte buffer, int offset, int size, AsyncCallback callback, Object state ) : IAsyncResult
buffer byte
offset int
size int
callback AsyncCallback
state Object
return IAsyncResult

BeginWrite() public method

public BeginWrite ( byte buffer, int offset, int size, AsyncCallback callback, Object state ) : IAsyncResult
buffer byte
offset int
size int
callback AsyncCallback
state Object
return IAsyncResult

Close() public method

public Close ( int timeout ) : void
timeout int
return void

CopyToAsync() public method

public CopyToAsync ( Stream destination, int bufferSize, CancellationToken cancellationToken ) : System.Threading.Task
destination System.IO.Stream
bufferSize int
cancellationToken System.Threading.CancellationToken
return System.Threading.Task

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

EndRead() public method

public EndRead ( IAsyncResult asyncResult ) : int
asyncResult IAsyncResult
return int

EndWrite() public method

public EndWrite ( IAsyncResult asyncResult ) : void
asyncResult IAsyncResult
return void

Flush() public method

public Flush ( ) : void
return void

FlushAsync() public method

public FlushAsync ( CancellationToken cancellationToken ) : System.Threading.Task
cancellationToken System.Threading.CancellationToken
return System.Threading.Task

NetworkStream() public method

public NetworkStream ( Socket socket ) : System.Buffers
socket Socket
return System.Buffers

NetworkStream() public method

public NetworkStream ( Socket socket, FileAccess access ) : System.Buffers
socket Socket
access FileAccess
return System.Buffers

NetworkStream() public method

public NetworkStream ( Socket socket, FileAccess access, bool ownsSocket ) : System.Buffers
socket Socket
access FileAccess
ownsSocket bool
return System.Buffers

NetworkStream() public method

public NetworkStream ( Socket socket, bool ownsSocket ) : System.Buffers
socket Socket
ownsSocket bool
return System.Buffers

Read() public method

public Read ( byte buffer, int offset, int size ) : int
buffer byte
offset int
size int
return int

ReadAsync() public method

public ReadAsync ( byte buffer, int offset, int size, CancellationToken cancellationToken ) : Task
buffer byte
offset int
size int
cancellationToken System.Threading.CancellationToken
return Task

Seek() public method

public Seek ( long offset, SeekOrigin origin ) : long
offset long
origin SeekOrigin
return long

SetLength() public method

public SetLength ( long value ) : void
value long
return void

Write() public method

public Write ( byte buffer, int offset, int size ) : void
buffer byte
offset int
size int
return void

WriteAsync() public method

public WriteAsync ( byte buffer, int offset, int size, CancellationToken cancellationToken ) : System.Threading.Task
buffer byte
offset int
size int
cancellationToken System.Threading.CancellationToken
return System.Threading.Task