NetworkUdpSenderInterface Class Reference

#include <network_ip_udp.h>

Inheritance diagram for NetworkUdpSenderInterface:

详细描述

An asynchronous UDP sender.

Public Types

using  SendCompletionHandler = NetworkUdpChannelInterface::SendCompletionHandler

公共成员函数

MAXON_METHOD Result < void >  Send (const AioStatusRef &status, AioBuffer data, const NetworkIpAddrPort &destAddress, SendCompletionHandler handler= NetworkUdpChannelInterface::DefaultSendCompletionHandler )
MAXON_METHOD Result < void >  Send ( AioBuffer data, const NetworkIpAddrPort &destAddress, SendCompletionHandler handler= NetworkUdpChannelInterface::DefaultSendCompletionHandler )
MAXON_METHOD AioServiceRef  GetIoService () const
MAXON_METHOD JobQueueRef   GetJobQueue () const

私有成员函数

  MAXON_INTERFACE ( NetworkUdpSenderInterface , MAXON_REFERENCE_NORMAL , "net.maxon.interface.networkudpsender")
-  Private Member Functions inherited from AioWriterInterface
MAXON_METHOD Result < void >  NotifyForWrite ( SocketT sockfd, Result < void > result)

Member Typedef Documentation

◆  SendCompletionHandler

using SendCompletionHandler = NetworkUdpChannelInterface::SendCompletionHandler

成员函数文档编制

◆  MAXON_INTERFACE()

MAXON_INTERFACE ( NetworkUdpSenderInterface   ,
MAXON_REFERENCE_NORMAL   ,
"net.maxon.interface.networkudpsender"   
)
private

◆  Send() [1/2]

MAXON_METHOD Result <void> Send ( const AioStatusRef &  status ,
AioBuffer   data ,
const NetworkIpAddrPort destAddress ,
SendCompletionHandler   handler = NetworkUdpChannelInterface::DefaultSendCompletionHandler  
)

Enqueues an asynchronous send request. As soon as data has been sent, the given handler delegate is called. A status instance can be used to synchronously wait on the operation and check its success.

参数
[in] status Status monitor for the operation.
[in] data Buffer containing data to be sent.
[in] destAddress Destination address.
[in] handler Handler delegate.
返回
True if the request has been enqueued, error otherwise.

◆  Send() [2/2]

MAXON_METHOD Result <void> Send ( AioBuffer   data ,
const NetworkIpAddrPort destAddress ,
SendCompletionHandler   handler = NetworkUdpChannelInterface::DefaultSendCompletionHandler  
)

Equivalent to Send(AioStatusRef(), data, destAddress, handler).

◆  GetIoService()

MAXON_METHOD AioServiceRef GetIoService ( ) const

Returns the I/O service that processes I/O operations of this instance.

◆  GetJobQueue()

MAXON_METHOD JobQueueRef GetJobQueue ( ) const

Returns the job queue that runs completion handlers of this instance.