Open Search
    NetworkTcpInterface Class Reference

    #include <network_ip_tcp.h>

    Detailed Description

    Static interface to access network functionality.

    Public Types

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

    Static Public Member Functions

    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)
     

    Private Member Functions

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

    Member Typedef Documentation

    ◆ ConnectCompletionHandler

    ◆ AcceptCompletionHandler

    Member Function Documentation

    ◆ 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.

    Parameters
    [in]addressAddress to connect to.
    [in]handlerHandler delegate.
    [in]ioServiceI/O service for the connection.
    [in]jobQueueJob queue for the connection.
    Returns
    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.

    Parameters
    [in]localAddressAddress to connect to.
    [in]handlerHandler delegate.
    [in]ioServiceI/O service for the connection.
    [in]jobQueueJob queue for the connection.
    Returns
    True if the connection was established, error otherwise.