UCM Unitec Home Page
      

Send Formatted Message

 UcmSendf(F)

Synopsis   Environment   Description   Diagnostics   See also   Examples

Synopsis

#include "ucm.h"

int UcmSendf(sock, msgId, format [, arg]...);
T_SOCKET sock;
char *msgId, *format;

Environment

Unix, Win32

Description

UcmSendf sends a printf(3) formatted message trough the socket specified by sock.

UcmSendf will fail if one or more of the following is true:

UE_NOTINIT The UCM software has not been initialize (see UcmInit)
UE_BADSOCK The value of sock is not a valid socket descriptor or the socket is not open.
UE_INTR The send process has been interrupted by a signal.
UE_CONNECT The socket has been closed.

Diagnostics

Upon successful completion UcmSendf returns UCM_SUCCESS. Otherwise, UCM_ERROR is returned and ucmErrno is set to indicate the error.

See also

UcmInit, UcmSend, printf(3)

Examples

 
#include "ucm.h"

int rc;       /* return-code */
...
rc = UcmSendf(sock, "TestID", "One more time: %s", "Hello world");
printf("UcmSendf returned %d\n", rc);
 

Back to top