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.

Top of list<br />

Index page<br />

Interrupt 0xAC service 0x0D: API_ACCEPT, Accept the next incoming connection<br />

This API extracts the first connection on the queue of pending connections (from API_LISTEN) and creates a<br />

new socket for this connection.<br />

Parameters<br />

AH<br />

BX<br />

DX:SI<br />

0x0D (= API_ACCEPT)<br />

Socket descriptor (must be switched into listen mode using API_LISTEN)<br />

Output Parameter: Pointer to a sockaddr_in structure (see tcpipapi.h)<br />

Return Value<br />

Comments<br />

DX = 0 success, AX: contains new socket descriptor for the connection<br />

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

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

On success, this function fills in the sockaddr_in structure at [DX:SI] with the IP address and port number of<br />

the accepted connection.<br />

The new socket will have the same socket options as the listening socket (BX).<br />

Related Topics<br />

Top of list<br />

Index page<br />

API_SETSOCKOPT - Set socket options<br />

Interrupt 0xAC service 0x0E: API_LISTEN, Listen for incoming connections<br />

Places the socket into passive mode and sets the number of incoming TCP connections that the system will<br />

queue.<br />

Parameters<br />

AH<br />

BX<br />

CX<br />

0x0E (= API_LISTEN)<br />

Socket descriptor<br />

Page 113 / 400

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

Saved successfully!

Ooh no, something went wrong!