C# Class System.Net.WebSockets.WebSocketHttpListenerDuplexStream

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

Public Methods

Method Description
Abort ( ) : void
BeginRead ( byte buffer, int offset, int count, AsyncCallback callback, object state ) : IAsyncResult
BeginWrite ( byte buffer, int offset, int count, AsyncCallback callback, object state ) : IAsyncResult
CloseNetworkConnectionAsync ( CancellationToken cancellationToken ) : Task
EndRead ( IAsyncResult asyncResult ) : int
EndWrite ( IAsyncResult asyncResult ) : void
Flush ( ) : void
FlushAsync ( CancellationToken cancellationToken ) : Task
MultipleWriteAsync ( IList sendBuffers, CancellationToken cancellationToken ) : Task
Read ( byte buffer, int offset, int count ) : int
ReadAsync ( byte buffer, int offset, int count, CancellationToken cancellationToken ) : Task
ReadByte ( ) : int
Seek ( long offset, SeekOrigin origin ) : long
SetLength ( long value ) : void
SwitchToOpaqueMode ( WebSocketBase webSocket ) : void
WebSocketHttpListenerDuplexStream ( HttpRequestStream inputStream, HttpResponseStream outputStream, HttpListenerContext context ) : Microsoft.Win32.SafeHandles
Write ( byte buffer, int offset, int count ) : void
WriteAsync ( byte buffer, int offset, int count, CancellationToken cancellationToken ) : Task
WriteByte ( byte value ) : void

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Private Methods

Method Description
CanHandleException ( Exception error ) : bool
MultipleWriteAsyncCore ( IList sendBuffers, CancellationToken cancellationToken ) : Task
OnCancel ( object state ) : void
OnReadCompleted ( object sender, HttpListenerAsyncEventArgs eventArgs ) : void
OnWriteCompleted ( object sender, HttpListenerAsyncEventArgs eventArgs ) : void
ReadAsyncCore ( byte buffer, int offset, int count, CancellationToken cancellationToken ) : Task
ReadAsyncFast ( HttpListenerAsyncEventArgs eventArgs ) : bool
WriteAsyncCore ( byte buffer, int offset, int count, CancellationToken cancellationToken ) : Task
WriteAsyncFast ( HttpListenerAsyncEventArgs eventArgs ) : bool

Method Details

Abort() public method

public Abort ( ) : void
return void

BeginRead() public method

public BeginRead ( byte buffer, int offset, int count, AsyncCallback callback, object state ) : IAsyncResult
buffer byte
offset int
count int
callback AsyncCallback
state object
return IAsyncResult

BeginWrite() public method

public BeginWrite ( byte buffer, int offset, int count, AsyncCallback callback, object state ) : IAsyncResult
buffer byte
offset int
count int
callback AsyncCallback
state object
return IAsyncResult

CloseNetworkConnectionAsync() public method

public CloseNetworkConnectionAsync ( CancellationToken cancellationToken ) : Task
cancellationToken System.Threading.CancellationToken
return 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 ) : Task
cancellationToken System.Threading.CancellationToken
return Task

MultipleWriteAsync() public method

public MultipleWriteAsync ( IList sendBuffers, CancellationToken cancellationToken ) : Task
sendBuffers IList
cancellationToken System.Threading.CancellationToken
return Task

Read() public method

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

ReadAsync() public method

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

ReadByte() public method

public ReadByte ( ) : int
return int

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

SwitchToOpaqueMode() public method

public SwitchToOpaqueMode ( WebSocketBase webSocket ) : void
webSocket WebSocketBase
return void

WebSocketHttpListenerDuplexStream() public method

public WebSocketHttpListenerDuplexStream ( HttpRequestStream inputStream, HttpResponseStream outputStream, HttpListenerContext context ) : Microsoft.Win32.SafeHandles
inputStream HttpRequestStream
outputStream HttpResponseStream
context HttpListenerContext
return Microsoft.Win32.SafeHandles

Write() public method

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

WriteAsync() public method

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

WriteByte() public method

public WriteByte ( byte value ) : void
value byte
return void