About
The Transmission Control Protocol allows to create network connections to remote machines in order to send data. The maxon::NetworkTcpInterface is used to create either an outgoing connection to send TCP/IP data or to create an server to receive such data.
- Note
 - The TCP interface uses an AioService. See maxon::AioServiceInterface.
 
NetworkTcpInterface
The maxon::NetworkTcpInterface provides these functions:
NetworkTcpServerInterface
The maxon::NetworkTcpServerInterface defines a TCP server that reacts to incoming TCP connections:
  
  
 
  
 
  
static auto Create(ARGS &&... args)
Definition: apibase.h:2823
 
static const JobQueueInterface::Current JOBQUEUE_CURRENT
Equivalent to calling GetDestinationQueue(), you just save a function call.
Definition: jobqueue.h:377
 
maxon::NetworkIpAddrPort NetworkIpAddrPort
Definition: operatingsystem.h:312
 
The maxon namespace contains all declarations of the Maxon API.
Definition: autoweight.h:21
 
static const WILDCARD_IPV4_ADDRESS_TYPE WILDCARD_IPV4_ADDRESS
Definition: network_ip_addr.h:45
 
#define iferr_return
Definition: resultbase.h:1531
 
 For an example on the callback function see below.
NetworkTcpConnectionInterface
The maxon::NetworkTcpConnectionInterface represents an established TCP connection. This connection can receive data from the remote machine or send data to that machine.
 
{
 
  
 
  
  connection.Receive(
    {
 
 
}
const char ** buffer
Definition: abstract.h:327
 
Definition: network_ip_addr.h:444
 
Definition: string.h:1287
 
const char * message
Definition: pyerrors.h:189
 
Py_UCS4 * res
Definition: unicodeobject.h:1113
 
return OK
Definition: apibase.h:2740
 
#define DiagnosticOutput(formatString,...)
Definition: debugdiagnostics.h:170
 
#define iferr_scope
Definition: resultbase.h:1396
 
    
 
  
 
  
  maxon::NetworkTcpInterface::OpenOutgoingConnection(remoteAddr,
 
    [](
maxon::Result<
void>, 
maxon::NetworkTcpConnectionRef connection) -> 
maxon::Result<
void>
 
    {
 
      {
          err.DbgStop();
      }
 
      return connection.Send(std::move(
buffer));
 
 
Definition: string.h:1542
 
Py_UNICODE c
Definition: unicodeobject.h:1200
 
char Char
signed 8 bit character
Definition: apibase.h:183
 
#define iferr(...)
Definition: errorbase.h:388
 
  
Further Reading