TipcSrvMsgWriteVa


Name

TipcSrvMsgWriteVa — construct a message and send it through the connection to RTserver (va_list version)

Synopsis

T_BOOL TipcSrvMsgWriteVa(dest, mt, check_server_msg_send, var_arg_list) 
T_STR dest; 
T_IPC_MT mt; 
T_BOOL check_server_msg_send; 
va_list var_arg_list; 

Arguments

dest — message destination

mt — message type

check_server_msg_send — whether or not to check the option Server_Msg_Send first

var_arg_list — argument list

Return Values

TRUE if the message was successfully constructed and sent, FALSE otherwise.

Diagnostics

If TipcSrvMsgWriteVa fails, it returns FALSE and sets the global SmartSockets error number to one of:

Description

TipcSrvMsgWriteVa is the non-varargs version of TipcSrvMsgWrite (TipcSrvMsgWrite actually calls TipcSrvMsgWriteVa). TipcSrvMsgWriteVa can be used to implement a varargs function.

In the C language, a varargs function (one that takes a variable number of arguments) cannot call another varargs function with the original arguments. A varargs function usually calls a helper function that takes a fixed number of arguments, with the last argument usually of type va_list. TipcSrvMsgWriteVa is TipcSrvMsgWrite’s helper function.

Caution

None

See Also

TipcSrvMsgWrite, TipcMsgWriteVa, TipcSrvMsgSend

Examples

This example shows how to write a varargs function in ANSI C that is similar to TipcSrvMsgWrite, but always checks the option Server_Msg_Send:

T_BOOL T_ENTRY my_srv_msg_write(T_STR dest, 
                                T_IPC_MT mt, 
                                ...) 
{ 
  va_list var_arg_list; 
  T_BOOL status; 
 
  va_start(var_arg_list, mt); 
  status = TipcSrvMsgWriteVa(dest, mt, TRUE, var_arg_list); 
  va_end(var_arg_list); 
  return status; 
} /* my_srv_msg_write */ 

TIBCO SmartSockets™ Application Programming Interface
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com