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.

Interrupt 0xAC service 0x04: API_CONNECT, Connect to another socket<br />

For TCP only. The connect call attempts to make a connection to another socket (either local or remote).<br />

This call is used by a TCP client.<br />

Parameters<br />

AH<br />

BX<br />

DX:SI<br />

0x04 (= API_CONNECT)<br />

Socket descriptor<br />

Pointer to a sockaddr_in structure containing host's IP address and port number.<br />

Return Value<br />

Comments<br />

Top of list<br />

Index page<br />

DX = 0 success AX: 0<br />

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

The caller must fill in the first three elements of the sockaddr_in data structure at [DX:SI] prior to calling<br />

here.<br />

Interrupt 0xAC service 0x05: API_RECVFROM, Receive UDP message<br />

Parameters<br />

AH<br />

BX<br />

DX:SI<br />

For UDP only, receives message from another socket.<br />

0x05 (= API_RECVFROM)<br />

Socket descriptor<br />

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

Return Value<br />

Comments<br />

DX = 0 success AX: number of received bytes where 0 bytes indicates a timeout<br />

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

This function will output the received data to the buffer referenced by recv_params.bufferPtr pointer. Up<br />

to recv_params.bufferLength bytes will be accepted. The AX return value indicates the number of bytes<br />

Page 108 / 400

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

Saved successfully!

Ooh no, something went wrong!