tsend.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int tsend_dgram (int fd, char *buf, unsigned int len, const struct sockaddr *to, socklen_t tolen, int timeout)
 sends on dgram fd (which must be O_NONBLOCK); if it cannot send any data in timeout milliseconds it will return ERROR
int tsend_dgram_ev (int fd, const struct iovec *v, int count, int timeout)
 sends on connected datagram fd (which must be O_NONBLOCK); if it cannot send any data in timeout milliseconds it will return ERROR
int tsend_stream (int fd, char *buf, unsigned int len, int timeout)
 sends on fd (which must be O_NONBLOCK); if it cannot send any data in timeout milliseconds it will return ERROR


Function Documentation

int tsend_dgram ( int  fd,
char *  buf,
unsigned int  len,
const struct sockaddr *  to,
socklen_t  tolen,
int  timeout 
)

sends on dgram fd (which must be O_NONBLOCK); if it cannot send any data in timeout milliseconds it will return ERROR

Returns:
-1 on error, or number of bytes written (if less than len => couldn't send all) bugs: signals will reset the timer

Definition at line 129 of file tsend.c.

References TSEND_ERR_CHECK, TSEND_INIT, and TSEND_POLL.

int tsend_dgram_ev ( int  fd,
const struct iovec *  v,
int  count,
int  timeout 
)

sends on connected datagram fd (which must be O_NONBLOCK); if it cannot send any data in timeout milliseconds it will return ERROR

Returns:
-1 on error, or number of bytes written (if less than len => couldn't send all) bugs: signals will reset the timer

Definition at line 151 of file tsend.c.

References TSEND_ERR_CHECK, TSEND_INIT, and TSEND_POLL.

Referenced by write_to_unixsock().

int tsend_stream ( int  fd,
char *  buf,
unsigned int  len,
int  timeout 
)

sends on fd (which must be O_NONBLOCK); if it cannot send any data in timeout milliseconds it will return ERROR

Returns:
-1 on error, or number of bytes written (if less than len => couldn't send all) bugs: signals will reset the timer

Definition at line 92 of file tsend.c.

References MSG_NOSIGNAL, TSEND_ERR_CHECK, TSEND_INIT, and TSEND_POLL.


Generated on Thu May 24 20:00:45 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6