tpnotify
-routine for sending notification by client identifier
#include <atmi.h>
int tpnotify(CLIENTID *clientid, char *data, long len, long flags)
tpnotify
() allows a client or server to send an unsolicited message to an individual client.
clientid
is a pointer to a client identifier saved from the TPSVCINFO
structure of a previous or current service invocation, or passed to a client via some other communications mechanism (for example, retrieved via the administration interface).
The data portion of the request is pointed to by data
, a buffer previously allocated by tpalloc
(3). len
specifies how much of data
to send. Note that if data
points to a buffer type that does not require a length to be specified, (for example, an FML
fielded buffer) then len
is ignored (and may be 0). Also, data
may be NULL in which case len
is ignored.
Upon successful return from tpnotify
(), the message has been delivered to the system for forwarding to the identified client. If the TPACK
flag was set, a successful return means the message has been received by the client. Furthermore, if the client has registered an unsolicited message handler, the handler will have been called.
Following is a list of valid flags
.
TPACK
TPNOBLOCK
TPNOTIME
TPSIGRSTRT
Unless the TPACK
flag is set, tpnotify
() does not wait for the message to be delivered to the client.
tpnotify
() returns -1 on failure and sets tperrno
to indicate the error condition. If a call fails with a particular tperrno
value, a subsequent call to tperrordetail
(3c) with no intermediate ATMI calls, may provide more detailed information about the generated error. Refer to the tperrordetail
(3c) reference page for more information.
Under the following conditions, tpnotify
() fails and sets tperrno
to:
TPEINVAL
]
TPENOENT
]
TPACK
flag is set.
TPETIME
]
TPNOBLOCK
nor TPNOTIME
were specified, or TPACK
was set but no acknowledgment was received and TPNOTIME
was not specified.
TPEBLOCK
]
TPNOBLOCK
was specified.
TPGOTSIG
]
TPSIGRSTRT
was not specified.
TPEPROTO
]
tpnotify
() was called in an improper context.
TPESYSTEM
]
TPEOS
]
TPERELEASE
]
TPACK
is set and the target is a client from a prior release of BEA TUXEDO that does not support the acknowledgment protocol.
intro
(3), tpalloc
(3), tpbroadcast
(3), tpchkunsol
(3), tperrordetail
(3c),tpinit
(3), tpsetunsol
(3), tpstrerrordetail
(3c), tpterm
(3)