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.

RTOS/TM4C1294NCPDT: Client and Server

Part Number: TM4C1294NCPDT

Tool/software: TI-RTOS

Dear all,

  Can i create the server and client both in the same time? When i can connect to the cloud, but i can not use TCP connect to 1294(server).

void netOpenHook()
{
    Task_Handle CloudNet_taskHandle; // Cloud
    Task_Params CloudNet_taskParams;
    Error_Block CloudNet_eb;
	
    Task_Handle TCPNet_taskHandle; // TCP
    Task_Params TCPNet_taskParams;
    Error_Block TCPNet_eb;

    /* Make sure Error_Block is initialized */
    Error_init(&CloudNet_eb);
    Error_init(&TCPNet_eb);

    /* Create the Task for the Client */
    Task_Params_init(&CloudNet_taskParams);
    CloudNet_taskParams.stackSize = TCPHANDLERSTACK;
    CloudNet_taskParams.priority = 2;
    CloudNet_taskParams.arg0 = CloudPORT;
    CloudNet_taskHandle = Task_create((Task_FuncPtr)cloudHandler, &CloudNet_taskParams, &CloudNet_eb);

    if(CloudNet_taskHandle == NULL)
    {
        //
    }
	
    /*
     *  Create the Task that farms out incoming TCP connections.
     *  arg0 will be the port that this task listens to.
     */
    Task_Params_init(&TCPNet_taskParams);
    TCPNet_taskParams.stackSize = TCPHANDLERSTACK;
    TCPNet_taskParams.priority = 2;
    TCPNet_taskParams.arg0 = TCPPORT;
    TCPNet_taskHandle = Task_create((Task_FuncPtr)tcpHandler, &TCPNet_taskParams, &TCPNet_eb);
	
    if(TCPNet_taskHandle == NULL)
    {
        //
    }
}