C# Class NLog.Internal.NetworkSenders.NetworkSender

A base class for all network senders. Supports one-way sending of messages over various protocols.
Inheritance: IDisposable
Afficher le fichier Open project: NLog/NLog Class Usage Examples

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
Dispose ( bool disposing ) : void

Method Details

CheckSocket() public méthode

public CheckSocket ( ) : void
Résultat void

Close() public méthode

Closes the sender and releases any unmanaged resources.
public Close ( AsyncContinuation continuation ) : void
continuation AsyncContinuation The continuation.
Résultat void

Dispose() public méthode

Closes the sender and releases any unmanaged resources.
public Dispose ( ) : void
Résultat void

DoClose() protected méthode

Performs sender-specific close operation.
protected DoClose ( AsyncContinuation continuation ) : void
continuation AsyncContinuation The continuation.
Résultat void

DoFlush() protected méthode

Performs sender-specific flush.
protected DoFlush ( AsyncContinuation continuation ) : void
continuation AsyncContinuation The continuation.
Résultat void

DoInitialize() protected méthode

Performs sender-specific initialization.
protected DoInitialize ( ) : void
Résultat void

DoSend() protected abstract méthode

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.
Résultat void

FlushAsync() public méthode

Flushes any pending messages and invokes a continuation.
public FlushAsync ( AsyncContinuation continuation ) : void
continuation AsyncContinuation The continuation.
Résultat void

Initialize() public méthode

Initializes this network sender.
public Initialize ( ) : void
Résultat void

NetworkSender() protected méthode

Initializes a new instance of the NetworkSender class.
protected NetworkSender ( string url ) : System
url string The network URL.
Résultat System

ParseEndpointAddress() protected méthode

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.
Résultat System.Net.EndPoint

Send() public méthode

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.
Résultat void