Set the DNS node name.
int dim_set_dns_node (char *node_name)
char *node_name
The node (or a list of nodes separated by commas) where the DNS is (possibly) running.
int return_code
Returns 1 if successful.
This routine can be called by a server or a client program before publishing or subscribing to any services in order to programmatically declare the node where the DNS is running. If this call is not used the environment variable DIM_DNS_NODE will be used instead.
A list of node names separated by commas can be given as a parameter, in which case the server or the client will use the first name server found running from the list.
Note: If a process is at the same time a DIM server and a DIM client, this function sets the DIM_DNS_NODE for both parts. In order to change independently the DIM_DNS_NODE for the server or for the client part please use (respectively): dis_set_dns_node() and dic_set_dns_node().
Get the DNS node name.
int dim_get_dns_node (char *node_name)
char *node_name
Returns the node (or a list of nodes separated by commas) where the DNS is (possibly) running.
int return_code
Returns 1 if successful.
This routine can be called by a server or a client program to find out where the DNS was defined to be running.
Set the DNS port number.
int dim_set_dns_port (int port)
int port
The port number of the DNS.
int return_code
Returns 1 if successful.
This routine can be called by a server or a client program before publishing or subscribing to any services, together with dim_set_dns_node() in order to programmatically declare the port number used by the DNS (if the DNS was started with a non-default port number by using the environment variable DIM_DNS_PORT). The default port number of the DNS is 2505.
Note: If a process is at the same time a DIM server and a DIM client, this function sets the DIM_DNS_PORT for both parts. In order to change independently the DIM_DNS_PORT for the server or for the client part please use (respectively): dis_set_dns_port() and dic_set_dns_port().
Get the DNS port number.
int dim_get_dns_port ()
int port
Returns the DNS port number.
This routine can be called by a server or a client program to find out what port number was defined for the DNS.
Start a user Thread
void dim_start_thread (user_routine, tag)
void *user_routine;
The address of a routine to be executed by this thread.long tag;
A parameter to be sent to the user_routine in order to identify the thread.
This routine starts a thread. The user_routine will be called and run as a separate thread.
Routine written by the user, called when a thread is started by dim_start_thread().
void user_routine (tag)
long tag;
The parameter that identifies the thread. The tag given to dim_start_thread.
This routine is run in a separate thread when dim_start_thread() is called.