Creates a
DOFServer
that uses the specified configuration. The server is associated with the DOF instance that creates
it, and only that 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(int)
or
DOFServer.beginStart(int)
.
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()
and
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 method may be used to create unicast servers, but not to create multicast servers. Use
DOFServer.createServer(Config)
to create multicast servers.
Namespace: org.opendof.core.oal
Assembly: dof-oal (in dof-oal.dll) Version: 7.0.1.2
Syntax
C#
public DOFServer createServer( DOFServerConfig config )
Parameters
- config
- Type: org.opendof.core.oalDOFServerConfig
An instance of Config that represents a source of configuration parameters for the DOFServer. Use Builder to create an instance of DOFServer.Config. This must not be null and must not have a multicast address.
Return Value
Type: DOFServerA new instance of DOFServer. The return value will be null if the configuration is invalid or if the DOF cannot accept the new DOFServer.
See Also