UdpReceiveFrom
Valid for: CANoe DE • CANoe4SW DEFunction Syntax
Method Syntax
Method SyntaxDescription
The function receives data into the specified buffer. If the receive operation does not complete immediately the operation is performed asynchronously and the function will return SOCKET_ERROR (-1). Use IpGetLastSocketError to get a more specific error code. If the specific error code is WSA_IO_PENDING (997) the CAPL callback OnUdpReceiveFrom will be called on completion (successful or not), provided it is implemented in the same CAPL program.Parameters
- socket: The socket handle.
- buffer: The buffer used to store the incoming data.
- size: The size of the data buffer.
Return Values
- 0: The function completed successfully.
- WSA_INVALID_PARAMETER (87): The specified socket was invalid.
- SOCKET_ERROR (-1): The function failed. Call IpGetLastSocketError to get a more specific error code.