C# Класс HttpServer.Transports.ReusableSocketNetworkStream

Custom network stream to mark sockets as reusable when disposing the stream.
Наследование: System.Net.Sockets.NetworkStream
Показать файл Открыть проект

Открытые методы

Метод Описание
Close ( ) : void

Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream.

ReusableSocketNetworkStream ( Socket socket ) : System

Creates a new instance of the T:System.Net.Sockets.NetworkStream class for the specified T:System.Net.Sockets.Socket.

ReusableSocketNetworkStream ( Socket socket, FileAccess access ) : System

Creates a new instance of the T:System.Net.Sockets.NetworkStream class for the specified T:System.Net.Sockets.Socket with the specified access rights.

ReusableSocketNetworkStream ( Socket socket, FileAccess access, bool ownsSocket ) : System

Creates a new instance of the T:System.Net.Sockets.NetworkStream class for the specified T:System.Net.Sockets.Socket with the specified access rights and the specified T:System.Net.Sockets.Socket ownership.

ReusableSocketNetworkStream ( Socket socket, bool ownsSocket ) : System

Initializes a new instance of the T:System.Net.Sockets.NetworkStream class for the specified T:System.Net.Sockets.Socket with the specified T:System.Net.Sockets.Socket ownership.

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

Метод Описание
Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the T:System.Net.Sockets.NetworkStream and optionally releases the managed resources.

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

Close() публичный Метод

Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream.
public Close ( ) : void
Результат void

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

Releases the unmanaged resources used by the T:System.Net.Sockets.NetworkStream and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
Результат void

ReusableSocketNetworkStream() публичный Метод

Creates a new instance of the T:System.Net.Sockets.NetworkStream class for the specified T:System.Net.Sockets.Socket.
/// The parameter is null. /// /// The parameter is not connected. /// -or- /// The property of the parameter is not . /// -or- /// The parameter is in a nonblocking state. ///
public ReusableSocketNetworkStream ( Socket socket ) : System
socket System.Net.Sockets.Socket /// The that the will use to send and receive data. ///
Результат System

ReusableSocketNetworkStream() публичный Метод

Creates a new instance of the T:System.Net.Sockets.NetworkStream class for the specified T:System.Net.Sockets.Socket with the specified access rights.
/// The parameter is null. /// /// The parameter is not connected. /// -or- /// the property of the parameter is not . /// -or- /// the parameter is in a nonblocking state. ///
public ReusableSocketNetworkStream ( Socket socket, FileAccess access ) : System
socket System.Net.Sockets.Socket /// The that the will use to send and receive data. ///
access FileAccess /// A bitwise combination of the values that specify the type of access given to the over the provided . ///
Результат System

ReusableSocketNetworkStream() публичный Метод

Creates a new instance of the T:System.Net.Sockets.NetworkStream class for the specified T:System.Net.Sockets.Socket with the specified access rights and the specified T:System.Net.Sockets.Socket ownership.
/// The parameter is null. /// /// The parameter is not connected. /// -or- /// The property of the parameter is not . /// -or- /// The parameter is in a nonblocking state. ///
public ReusableSocketNetworkStream ( Socket socket, FileAccess access, bool ownsSocket ) : System
socket System.Net.Sockets.Socket /// The that the will use to send and receive data. ///
access FileAccess /// A bitwise combination of the values that specifies the type of access given to the over the provided . ///
ownsSocket bool /// Set to true to indicate that the will take ownership of the ; otherwise, false. ///
Результат System

ReusableSocketNetworkStream() публичный Метод

Initializes a new instance of the T:System.Net.Sockets.NetworkStream class for the specified T:System.Net.Sockets.Socket with the specified T:System.Net.Sockets.Socket ownership.
/// The parameter is null. /// /// The parameter is not connected. /// -or- /// the value of the property of the parameter is not . /// -or- /// the parameter is in a nonblocking state. ///
public ReusableSocketNetworkStream ( Socket socket, bool ownsSocket ) : System
socket System.Net.Sockets.Socket /// The that the will use to send and receive data. ///
ownsSocket bool /// Set to true to indicate that the will take ownership of the ; otherwise, false. ///
Результат System