Syntax
VMINT vm_udp_receive(
    VM_UDP_HANDLE handle, 
    void* buffer, 
    VMINT32 length, 
    vm_soc_address_t* address
);
ContentsIndex
PreviousUpNext
vm_udp_receive
Example
Syntax
VMINT vm_udp_receive(
    VM_UDP_HANDLE handle, 
    void* buffer, 
    VMINT32 length, 
    vm_soc_address_t* address
);
Description

The Receive data from a source.

Parameters
Parameters 
Description 
VM_UDP_HANDLE handle 
[IN] The UDP handle. 
void* buffer 
[OUT] The Buffer. 
VMINT32 length 
[IN] The Buffer length. 
vm_soc_address_t* address 
[OUT] The source address. 
Returns

>= 0: The number of bytes received. 

< 0: An error code in VM_UDP_RESULT.

Example
 static void udp_callback(VMINT hdl, VMINT evt)
 {
     VMCHAR buf[1024] = {0};
     switch (evt)
     {
     case VM_UDP_EVENT_READ:
         {
             VMINT ret = 0;
             vm_soc_address_t recvfrom = {0};
             ret = vm_udp_receive(hdl, buf, 1024, &recvfrom);
         }break;
     default:
         {

         }break;
     }
 }
File

vmudp.h

Group
Created with a commercial version of 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.