C# Класс NLog.Internal.NetworkSenders.NetworkSender

A base class for all network senders. Supports one-way sending of messages over various protocols.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

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

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

Closes the sender and releases any unmanaged resources.

Dispose ( ) : void

Closes the sender and releases any unmanaged resources.

FlushAsync ( AsyncContinuation continuation ) : void

Flushes any pending messages and invokes a continuation.

Initialize ( ) : void

Initializes this network sender.

Send ( byte bytes, int offset, int length, AsyncContinuation asyncContinuation ) : void

Send the given text over the specified protocol.

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

Метод Описание
DoClose ( AsyncContinuation continuation ) : void

Performs sender-specific close operation.

DoFlush ( AsyncContinuation continuation ) : void

Performs sender-specific flush.

DoInitialize ( ) : void

Performs sender-specific initialization.

DoSend ( byte bytes, int offset, int length, AsyncContinuation asyncContinuation ) : void

Actually sends the given text over the specified protocol.

To be overridden in inheriting classes.

NetworkSender ( string url ) : System

Initializes a new instance of the NetworkSender class.

ParseEndpointAddress ( Uri uri, AddressFamily addressFamily ) : EndPoint

Parses the URI into an endpoint address.

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

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

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

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

public CheckSocket ( ) : void
Результат void

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

Closes the sender and releases any unmanaged resources.
public Close ( AsyncContinuation continuation ) : void
continuation AsyncContinuation The continuation.
Результат void

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

Closes the sender and releases any unmanaged resources.
public Dispose ( ) : void
Результат void

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

Performs sender-specific close operation.
protected DoClose ( AsyncContinuation continuation ) : void
continuation AsyncContinuation The continuation.
Результат void

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

Performs sender-specific flush.
protected DoFlush ( AsyncContinuation continuation ) : void
continuation AsyncContinuation The continuation.
Результат void

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

Performs sender-specific initialization.
protected DoInitialize ( ) : void
Результат void

DoSend() защищенный абстрактный Метод

Actually sends the given text over the specified protocol.
To be overridden in inheriting classes.
protected abstract DoSend ( byte bytes, int offset, int length, AsyncContinuation asyncContinuation ) : void
bytes byte The bytes to be sent.
offset int Offset in buffer.
length int Number of bytes to send.
asyncContinuation AsyncContinuation The async continuation to be invoked after the buffer has been sent.
Результат void

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

Flushes any pending messages and invokes a continuation.
public FlushAsync ( AsyncContinuation continuation ) : void
continuation AsyncContinuation The continuation.
Результат void

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

Initializes this network sender.
public Initialize ( ) : void
Результат void

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

Initializes a new instance of the NetworkSender class.
protected NetworkSender ( string url ) : System
url string The network URL.
Результат System

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

Parses the URI into an endpoint address.
protected ParseEndpointAddress ( Uri uri, AddressFamily addressFamily ) : EndPoint
uri System.Uri The URI to parse.
addressFamily AddressFamily The address family.
Результат System.Net.EndPoint

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

Send the given text over the specified protocol.
public Send ( byte bytes, int offset, int length, AsyncContinuation asyncContinuation ) : void
bytes byte Bytes to be sent.
offset int Offset in buffer.
length int Number of bytes to send.
asyncContinuation AsyncContinuation The asynchronous continuation.
Результат void