TipcSrvConnMsgWriteVa


Name

TipcSrvConnMsgWriteVa — construct a message and send it through the connection (va_list version)

Synopsis

T_BOOL TipcSrvConnMsgWriteVa(srv, dest, mt, check_server_msg_send, 
var_arg_list) 
T_IPC_SRV srv; 
T_STR dest; 
T_IPC_MT mt; 
T_BOOL check_server_msg_send; 
va_list var_arg_list; 

Arguments

srv — connection handle to RTserver

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 TipcSrvConnMsgWriteVa fails, it returns FALSE and sets the global SmartSockets error number to one of:

Description

TipcSrvConnMsgWriteVa is the non-varargs version of TipcSrvConnMsgWrite (TipcSrvConnMsgWrite actually calls TipcSrvConnMsgWriteVa). TipcSrvConnMsgWriteVa 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. TipcSrvConnMsgWriteVa is TipcSrvConnMsgWrite’s helper function.

Caution

None

See Also

TipcSrvConnMsgWrite, TipcMsgWrite, TipcSrvConnMsgSend

Examples

This example shows how to write a varargs function in ANSI C that is similar to TipcSrvConnMsgWrite:

T_BOOL T_ENTRY my_srv_msg_write(T_IPC_SRV srv, 
                                T_STR dest, 
                                T_IPC_MT mt, 
                                ...) 
{ 
  va_list var_arg_list; 
  T_BOOL status; 
 
  va_start(var_arg_list, mt); 
  status = TipcSrvConnMsgWriteVa(srv, 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