This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

tcp socket program on EVM6678

Hello,I want to develop a tcp socket client program on EVM6678, I defined the SOCKET for tcp as global variable so that I can use it in two tasks,the task described bellow:

one task for connectting the server, if it connected failed, it will sleep for one second ,then try agin, until it connected sucessful, after it failed , it will pended  with SemPend function;

the other task is for receiving data from server, if it receive enough data , it will trigger the process task.

 after I finished programing , I found I can just receive one time in the receive task, then it will failed, but if I combine the task into one task , it will work well,  how does this happen , if it does matter with fdOpenSession,can you give me some example like I use  socke?

  • Hi,

    I hope, you are using NDK client example for TCP send/receive.
    For seperate TCP send and receive socket task, see the HUA example code as per below task name at: C:\ti\mcsdk_2_01_02_06\demos\hua\src\benchmark
    TCP_perform_send
    TCP_perform_receive
    This is used for benchmark test, you have to change this task code to your own way.
    Comment out the "dtask_tcp_echo" task creation in NetworkOpen function, create the task for TCP_perform_send and TCP_perform_receive if you want to integrate with NDK client project.