NetworkTcpInterface Class Reference

#include <network_ip_tcp.h>

详细描述

Static interface to access network functionality.

Public Types

using  ConnectCompletionHandler = NetworkTcpConnectionInterface::ConnectCompletionHandler
using  AcceptCompletionHandler = NetworkTcpServerInterface::AcceptCompletionHandler

静态公共成员函数

static MAXON_METHOD Result < void >  OpenOutgoingConnection (const NetworkIpAddrPort &address, ConnectCompletionHandler handler, const AioServiceRef &ioService, const JobQueueRef &jobQueue)
static MAXON_METHOD Result < NetworkTcpServerRef >  CreateServer (const NetworkIpAddrPort &localAddress, AcceptCompletionHandler handler, const AioServiceRef &ioService, const JobQueueRef &jobQueue)

私有成员函数

  MAXON_INTERFACE_NONVIRTUAL ( NetworkTcpInterface , MAXON_REFERENCE_NORMAL , "net.maxon.interface.networktcp")

Member Typedef Documentation

◆  ConnectCompletionHandler

using ConnectCompletionHandler = NetworkTcpConnectionInterface::ConnectCompletionHandler

◆  AcceptCompletionHandler

using AcceptCompletionHandler = NetworkTcpServerInterface::AcceptCompletionHandler

成员函数文档编制

◆  MAXON_INTERFACE_NONVIRTUAL()

MAXON_INTERFACE_NONVIRTUAL ( NetworkTcpInterface   ,
MAXON_REFERENCE_NORMAL   ,
"net.maxon.interface.networktcp"   
)
private

◆  OpenOutgoingConnection()

static MAXON_METHOD Result <void> OpenOutgoingConnection ( const NetworkIpAddrPort address ,
ConnectCompletionHandler   handler ,
const AioServiceRef &  ioService ,
const JobQueueRef jobQueue  
)
static

Enqueues an asynchronous TCP connection attempt to the given address. As soon as the attempt is done, the given handler delegate is called.

参数
[in] address Address to connect to.
[in] handler Handler delegate.
[in] ioService I/O service for the connection.
[in] jobQueue Job queue for the connection.
返回
True if the connection was established, error otherwise.

◆  CreateServer()

static MAXON_METHOD Result <NetworkTcpServerRef> CreateServer ( const NetworkIpAddrPort localAddress ,
AcceptCompletionHandler   handler ,
const AioServiceRef &  ioService ,
const JobQueueRef jobQueue  
)
static

Creates an asynchronous TCP server bound to the given address. As soon as a connection is incoming, the given handler delegate is called.

参数
[in] localAddress Address to connect to.
[in] handler Handler delegate.
[in] ioService I/O service for the connection.
[in] jobQueue Job queue for the connection.
返回
True if the connection was established, error otherwise.