OpenDOF Project
Data Fields
DTLServer Struct Reference

The transport's Server interface structure, representing a transport-level server. More...

Data Fields

void(* Send )(DTLServer server, DOFAddress target, uint8 *data, uint32 offset, uint32 length)
 Send a response to the specified address using a server.
 
void(* Stop )(DTLServer server)
 Stop the server.
 
uint32(* GetConnectionCount )(DTLServer server)
 Get the number of server connections.
 
DOFAddress(* GetAddress )(DTLServer server)
 Get the listening address of the server.
 
DTLServer(* GetRelatedServer )(DTLServer server)
 Get the related server associated with the server, if any.
 
DTLTransportHandler(* GetHandler )(DTLServer server)
 Get the Transport Handler associated with the server.
 
DOFServerType(* GetServerType )(DTLServer server)
 Get the type of server.
 
void *(* GetContext )(DTLServer server)
 Get the context associated with the server.
 
boolean(* IsHandleAsync )(DTLServer server)
 Report whether or not the server needs to be handled asynchronously.
 
boolean(* IsSecure )(DTLServer server)
 Report whether or not the server is inherently secure.
 
DTLConnectionConfig(* GetConnectionConfig )(DTLServer server, DOFAddress address)
 Report the connection configuration associated with a connection to the given address.
 

Detailed Description

The transport's Server interface structure, representing a transport-level server.

The Transport-specific Server interface.

This interface encapsulates the transport-level implementation of a server, and is implemented by a transport that is intended to work with the C OAL. These servers can be streaming (e.g., TCP) or datagram (e.g., UDP). Datagram servers may further be able to receive data via multicast or broadcast.

Servers are expected to be immutable. Their properties are not expected to change. The context is opaque to the server.

This interface is called by a Transport Handler in the OAL.

This structure should be placed as the first element in a larger structure representing any necessary state of the Server. All of the functions take as their first argument a pointer to this structure (a DTLServer). Inside each function, it can thus be type-cast as a pointer to the larger structure to access the server's state. If no additional state is required, this structure may be used directly.

Defined as a pointer to the DTLServer_t structure. Refer to the structure for more information.

core-c-dof-oal Version 8.0.1 Build 0
2018-01-22