Changeset 646:cfc8da9264f4 in freeDiameter for include/freeDiameter/freeDiameter.h
- Timestamp:
- Jan 4, 2011, 4:20:50 PM (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
include/freeDiameter/freeDiameter.h
r640 r646 371 371 372 372 /* 373 * FUNCTION: fd_msg_send 373 * FUNCTION: fd_msg_send, fd_msg_send_timeout 374 374 * 375 375 * PARAMETERS: 376 376 * pmsg : Location of the message to be sent on the network (set to NULL on function return to avoid double deletion). 377 * anscb : A callback to be called when answer is received, if msg is a request (optional )377 * anscb : A callback to be called when answer is received, if msg is a request (optional for fd_msg_send) 378 378 * anscb_data : opaque data to be passed back to the anscb when it is called. 379 * timeout : (only for fd_msg_send_timeout) sets the absolute time until when to wait for an answer. Past this time, 380 * the anscb is called with the request as parameter and the answer will be discarded when received. 379 381 * 380 382 * DESCRIPTION: … … 399 401 * If no callback is registered to handle an answer, the message is discarded and an error is logged. 400 402 * 403 * fd_msg_send_timeout is similar to fd_msg_send, except that it takes an additional argument "timeout" and can be called 404 * only with requests as parameters, and an anscb callback. 405 * If the matching answer or error is received before the timeout date passes, everything occurs as with fd_msg_send. Otherwise, 406 * the request is removed from the queue (meaning the matching answer will be discarded upon reception) and passed to the answcb 407 * function. This function can easily distinguish between timeout case and answer case by checking if the message received is 408 * a request. Upon return, if the *msg parameter is not NULL, it is freed (not passed to other callbacks). 409 * 401 410 * RETURN VALUE: 402 411 * 0 : The message has been queued for sending (sending may fail asynchronously). … … 405 414 */ 406 415 int fd_msg_send ( struct msg ** pmsg, void (*anscb)(void *, struct msg **), void * data ); 416 int fd_msg_send_timeout ( struct msg ** pmsg, void (*anscb)(void *, struct msg **), void * data, const struct timespec *timeout ); 407 417 408 418 /*
Note: See TracChangeset
for help on using the changeset viewer.