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 streams silc_stream_write cannot be used. In those cases, this function must be used. However, this may also be used even if the stream is in connected state.
You can create the `stream' by calling silc_net_udp_connect.
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.