OpenDOF Project
DOFServer DOF_CreateServer ( DOF  self,
DOFServerConfig  config 
)

Creates a DOFServer that uses the specified configuration.

The new server is associated with the DOF instance that creates it, and only the DOF can accept connections or route operations through it (see DOF).

Servers do not start automatically when created. After creating the server, call DOFServer_Start or DOFServer_BeginStart. To stop the server temporarily, call DOFServer_Stop. Stopped servers can be restarted using DOFServer_Start or DOFServer_BeginStart. Each DOFServer instance must be destroyed when it is no longer needed. See DOFServer_Destroy. Destroyed servers cannot be restarted.

The internal library tracks references to duplicate servers, so this method can safely be called multiple times with the same configuration without consuming extra resources. Such duplicate servers are frequently needed, especially by nodes that create servers dynamically in response to other method calls.

This function may be used to create unicast servers, but not to create multicast servers. Use DOFServer_CreateServer to create multicast servers.

Resource Management:
This function allocates resources that must later be freed by calling DOFServer_Destroy.
Parameters
selfThe DOF instance to use to create the DOFServer. This must not be NULL.
configAn instance of DOFServerConfig that represents a source of configuration parameters for the DOFServer. Use DOFServerConfigBuilder to create an instance of DOFServerConfig. This should not be NULL and must not have a multicast address.
Returns
A new instance of DOFServer.
Exceptions
NULLis returned if the configuration is invalid, the DOF cannot accept the new DOFServer, or the DOFServer could not be created.
See Also
DOF_Stop
core-c-dof-oal Version 8.0.1 Build 0
2018-01-22