01.06.2013 Views

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

put into the buffer.<br />

The sender can be identified by the IP address and port number reported in the sockaddr_in structure<br />

API_RECVFROM can only return complete UDP datagrams at the user provided buffer. If the next waiting<br />

datagram at the internal socket receive queue has a higher size than the specified<br />

recv_param.bufferlength, API_RECVFROM returns errorcode 240 (Message too long) without writing<br />

the datagram into the user buffer. You can use API_GETRCV_BYTES to detect the size of the next waiting<br />

datagram at the internal receive queue of this socket.<br />

Related Topics<br />

Top of list<br />

Index page<br />

API_SENDTO - Send UDP datagram<br />

API_RECV - Receive TCP data<br />

API_GETRCV_BYTES - Get waiting bytes on a socket<br />

Interrupt 0xAC service 0x06: API_SENDTO, Transmit a UDP datagram<br />

Parameters<br />

AH<br />

BX<br />

DX:SI<br />

For UDP only, transmits message to another transport end-point.<br />

0x06 (= API_SENDTO)<br />

Socket descriptor<br />

Pointer to a send_params structure which caller must fill in prior to call.<br />

Return Value<br />

Comments<br />

DX = 0 success AX: number of bytes sent<br />

DX != 0 AX: contains error code<br />

This function will output up to send_params.bufferLength bytes from the buffer at<br />

send_params.bufferPtr to the IP address specified by the sockaddr_in structure referenced by the<br />

send_params.toPtr pointer. The return value indicates the actual number of bytes sent.<br />

Related Topics<br />

Top of list<br />

Index page<br />

API_RECVFROM - Receive UDP datagram<br />

API_SEND - Send TCP data<br />

Page 109 / 400

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!