VMINT vm_udp_send( VM_UDP_HANDLE handle, const void* buffer, VMUINT32 length, const vm_soc_address_t* address );
VMINT vm_udp_send( VM_UDP_HANDLE handle, const void* buffer, VMUINT32 length, const vm_soc_address_t* address );
This function sends data to the specified destination.
|
Parameters |
Description |
|
VM_UDP_HANDLE handle |
[IN] The UDP handle. |
|
const void* buffer |
[IN] The buffer. |
|
VMUINT32 length |
[IN] The buffer length. |
|
const vm_soc_address_t* address |
[IN] The destination address. |
The size of sent data.
static void udp_callback(VMINT hdl, VMINT evt) { vm_ip_address_t sendto = {0}; sendto.address[0] = 192; sendto.address[1] = 168; sendto.address[2] = 1; sendto.address[3] = 33; sendto.address_length = 4; sendto.port = 2500; void* buffer = "Hello"; switch (evt) { case VM_UDP_EVENT_WRITE: { VMINT ret = 0; ret = vm_udp_send(hdl, buffer, 6, &sendto); }break; default: { }break; } }
vmudp.h
Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at
support@toolsfactory.com.