Function silc_net_udp_send
SYNOPSIS
int silc_net_udp_send(SilcStream stream,
const char *remote_ip_addr, int remote_port,
const unsigned char *data, SilcUInt32 data_len);
DESCRIPTION
Sends an UDP packet to remote host `remote_ip_addr' on `remote_port'.
This may be used with UDP streams that are not connected to any
specific remote host. With those stream silc_stream_write cannot be
used. In those cases, this function must be used. This may also be
used even if the stream is connected.
Returns the amount of data written, -1 if data could not be written
at this moment, or -2 if error occurred. If -1 is returned the
notifier callback will later be called with SILC_STREAM_CAN_WRITE
status when stream is again ready for writing.
|