Example (EDG-4508+U):
SOCKADDR_IN Dst4508UAddr; SOCKET Dst4508USock;
char RxData[10];
memset(&Dst4508UAddr, 0, sizeof(SOCKADDR_IN)); Dst4508UAddr..sin_family = AF_INET; Dst4508UAddr..sin_addr.s_addr = inet_addr("10.0.0.1"); //Indicate the IP Address of
//Indicate which port of
//TCP port no. of Port1 = TCP port +1//
//TCP port no. of Port2 = TCP port +2//
Dst4508USock = socket(AF_INET, SOCK_STREAM, 0));
//
//Connect to the
//Send data "0123456789" to the port of
//Receive the data from the port of
//Disconnect from the
68 |