OpenDOF Project
boolean DOFConfigBuilder_SetConnectionLimit ( DOFConfigBuilder  self,
uint32  max 
)

Sets the maximum number of simultaneous connections, both inbound and outbound, that a DOF can support.

Inbound connections are those connected through all DOFServer instances on the node, although this parameter does not limit the number of servers you can create or start. Outbound connections are instances of DOFConnection for which you've called DOFConnection_Connect or DOFConnection_BeginConnect, although this parameter does not limit the number of connections you can create. In addition, only calls to DOFConnection_Connect or DOFConnection_BeginConnect that establish a new connection on the physical wire count toward the total—not calls for connections that have already been established. The sum of all inbound plus all outbound connections on the node must always be less than or equal to the value set for this parameter. If the node reaches its maximum, it will not allow you to initiate or accept new connections until some connections are dropped.

Inbound DOFCONNECTIONTYPE_DATAGRAM_STATELESS connections are not limited by this parameter, although outbound DATAGRAM_STATELESS connections do count toward the total.

If you input a value for the maximum number of connections that is greater than the limit the underlying operating system can handle, the number of connections you can initiate and accept will be constrained by the operating system.

By default, this parameter is set to a large number so that the operating system will manage the maximum number of connections. You would typically change this setting only for nodes with limited resources where you want to limit the connections to fewer than the operating system allows. If you enforce a limit, it should be carefully considered so that you do not prevent necessary connections.

Parameters
selfthe DOFConfigBuilder to set the maximum number of connections in. This must not be NULL.
maxThe maximum number of connections that the DOF can support. A value of zero will prevent all connections.
Returns
TRUE if the maximum value was set in the DOFConfigBuilder.
Exceptions
FALSEif the maximum value could not be set. The DOFConfigBuilder remains unchanged.
See Also
DOF_SetConnectionLimit
DOFState_GetConnectionLimit
DOFConfig_GetConnectionLimit
core-c-dof-oal Version 8.0.1 Build 0
2018-01-22