The core Transport interface structure, allowing connections and servers to be created at the transport layer. More...
Data Fields | |
boolean(* | Open )(DTLTransport transport, DTLConnectionConfig config, DOFAddress peer, DTLTransportHandler handler, DOFConnectionType type, void *context) |
Open a connection. | |
boolean(* | Start )(DTLTransport transport, DTLServerConfig config, DOFAddress listenAddress, DTLTransportHandler handler, DOFServerType type, DTLServer relatedServer, void *context) |
Start a server. | |
uint32(* | GetMaxSize )(DTLTransport transport, DOFConnectionType type) |
Get the Maximum Transmission Unit (MTU) size for the specified type of transmission. | |
uint32(* | GetMinSize )(DTLTransport transport, DOFConnectionType type) |
Get the Minimum Transmission size for the specified type of transmission. | |
DOFAddressType(* | GetAddressType )(DTLTransport transport, DOFAddress address) |
Get the type of the specified address. | |
boolean(* | IsConnectionConfigEqual )(DTLTransport transport, uint32 size, const void *config1, const void *config2) |
Report if two Transport DTLConnectionConfigs are equal. | |
boolean(* | IsServerConfigEqual )(DTLTransport transport, uint32 size, const void *config1, const void *config2) |
Report if two Transport DTLServerConfigs are equal. | |
int(* | AddressCompare )(DTLTransport transport, uint32 size, const void *addr1, const void *addr2) |
Compares two transport addresses. | |
boolean(* | AddressCopy )(DTLTransport transport, uint32 size, void *addr) |
This function is called after the library makes a shallow copy of a DOFAddress and its data. | |
void(* | AddressDestroy )(DTLTransport transport, uint32 size, const void *addr) |
Destroyer function for an address. | |
char *(* | GetAddressString )(DTLTransport transport, DOFAddress address) |
This function can be called to get a string representation of the DOFAddress. | |
The core Transport interface structure, allowing connections and servers to be created at the transport layer.
The Transport-specific core interface.
This interface is implemented by a transport that is intended to work with the C OAL.
This interface is called by a Transport Handler in the OAL to open outbound connections and start servers.
The connections and servers are separate interfaces, also implemented by the transport, and are also utilized by the Transport Handler.
This structure should be placed as the first element in a larger structure representing any necessary state of the Transport. 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 transport's state. If no additional state is required, this structure may be used directly.
Defined as a pointer to the DTLTransport_t structure. Refer to the structure for more information.