SENA HD132x Series User Manual

Page 43

Advertising
background image

HD132x Series User Manual

43

Character strings that you entered will be displayed as received data on the sample program,

and, since the sample program is programmed to send received data back to the HelloDevice,

the serial terminal program will again display the character strings.

Figure 5.9 Running the Sample Program

Below is a major part of the sample program. Characters in bold font indicate main functions of the

server socket such as listen, bind, accept, socket, recv and sendto. Since this sample is related to

the server socket, keep in mind that this is different from the sample of 5.2.1 such as socket

generation and data transmission.


//----------------------------------------

// Process listening : ProcessRecv called

//----------------------------------------

void ProcessListen()

{

int clientLen;

char chDumm;

clientLen = sizeof(addrClient);

memset((char*) &addrClient, 0, sizeof(addrClient));

Advertising