Setting Option Values


The most common way to set an option value is by specifying the setopt command with the option name and value in the startup command file for the RT process. Every RT process searches for command files upon startup, and executes the commands in those files. If you want to set the value for a named option, use the setnopt command with the option name and value in the startup command file. See Startup Command Files.

You can also use a CONTROL message. CONTROL messages are messages of type CONTROL and can contain any valid command. To change an option value, use a CONTROL message that contains the setopt or setnopt command. CONTROL messages can be used for any RT process. The examples in Working With RTclient show how to compose and send CONTROL messages. CONTROL messages received by an RT process are logged to the RT processes trace file if enabled.

You are not required to set any option values. All required options have default values that are used at startup. However, tailoring the option values to optimize your SmartSockets system is key to unleashing the power and flexibility of this messaging system.

For information on setting options for RTgms, see RTgms Options.

RTclient Options

RTclient options can be set to specific values by defining them in a command file, by calling the API function TutCommandParseStr, or by calling one of the TutOptionSetType API functions. You can also send a CONTROL message to a subject to which the RTclient is subscribed.

RTserver Options

RTserver options can be set to specific values by defining them in the rtserver.cm command file. Option values that have been specified in the command file are set each time RTserver is started, or they can be modified using the setopt command in a CONTROL message.

Certain options can be modified dynamically for a particular RTserver connection using an ADMIN_SET message. When you send the message to a particular RTserver process, the options apply only to outbound data sent on the specified connection. The connection can be:

The options that can be set this way are for network bandwidth rate control. For more information on bandwidth rate control, see Controlling Network Bandwidth and Usage.

The ADMIN_SET message used for RTservers is:

T_MT_ADMIN_SET_OUTBOUND_RATE_PARAMS 
T_STR   connection 
T_INT4  token_rate 
T_INT4  max_tokens 
T_REAL8 burst_interval 

where:

connection
for an RTclient or RTserver connection, connection is the unique subject name of the RTclient or RTserver for which you want these options set, and for an RTgms connection, connection must be the multicast group name of the connection, matching an existing group name specified by the Group_Names option.
token_rate
is the rate, in bytes a second, at which tokens accumulate. A value of -1 indicates no change.
If the value you specified for connection is the unique subject name of an RTclient, token_rate is equivalent to the Client_Token_Rate option.
If the value you specified for connection is the unique subject name for an RTserver, token_rate is equivalent to the Server_Token_Rate option.
If the value you specified for connection is the group name for a connection to an RTgms, token_rate is equivalent to the Group_Token_Rate option.
max_tokens
is the maximum number of tokens that can accumulate. A value of -1 indicates no change.
If the value you specified for connection is the unique subject name of an RTclient, max_tokens is equivalent to the Client_Max_Tokens option.
If the value you specified for connection is the unique subject name for an RTserver, max_tokens is equivalent to the Server_Max_Tokens option.
If the value you specified for connection is the group name for a connection to an RTgms, max_tokens is equivalent to the Group_Max_Tokens option.
burst_interval
is the burst interval in number of seconds. A value of -1.0 indicates no change.
If the value you specified for connection is the unique subject name of an RTclient, burst_interval is equivalent to the Client_Burst_Interval option.
If the value you specified for connection is the unique subject name for an RTserver, burst_interval is equivalent to the Server_Burst_Interval option.
If the value you specified for connection is the group name for a connection to an RTgms, burst_interval is equivalent to the Group_Burst_Interval option.

RTmon Options

RTmon options can be set to specific values by defining them in the rtmon.cm command file. Option values that have been specified in the command file are set each time the RTmon is started, or they can be modified from the RTmon command interface using the setopt command.

Specifying Options

Option names are shown in mixed case in this reference to differentiate them from commands, but options are not case sensitive.

When entering multiple values for list options, they must be separated by commas. Values for options of types String or String List can be entered with or without double quotes, with these exceptions:

You can use the standard C comment indicator // to comment out a line in a command file. For example:

setopt project           ST1A 
setopt server_names      workstation1 
//setopt server_disconnect_mode   gmd_failure 
setopt server_disconnect_mode   warm 

In this case, the value warm is used for Server_Disconnect_Mode.

For Java, instead of C, see the TIBCO SmartSockets Java Library User’s Guide and Tutorial.


TIBCO SmartSockets™ User’s Guide
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com