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.

关于DaemonNew函数的疑问

Other Parts Discussed in Thread: TMS320C6455

各位好,

     有一个问题想请教一下大家。我在测试以太网通信程序,使用TMS320C6455芯片,DSP/BIOS,NDK,TCP协议。问题如下,

     在NetworkOpen()

        {

             htcp = DaemonNew(SOCK_STREAMNC, NULL, hport, htcpip, OS_TASKPRINORM, OS_TASKSTKNORM, 0, 3);

        }

       int htcpip(SOCKET s, UINT32 unused)

       {

             struct timeval to;

             (void) unused;

             to.tv_sec = 100;

             to.tv_usec = 0;

            setsockopt(s, SOL_SOCKET, SO_SNDTIMEO, &to, sizeof(to));

            setsockopt(s, SOL_SOCKET, SO_SNDTIMEO, &to, sizeof(to));

            i_socket = 1;

            setsockopt(s, IPPROTO_TCP, TCP_NOPUSH, &i_socket, 4);

            for(;;)

            (

                i_socket = (int) recvnc(s, (void **)&pBuf, 0, &hBuffer);

                if(i_socket > 0)

                {

                         .........

                }

            )

       }

     当电路板上电连接后,马上由PC机向目标板发送数据,则TMS320C6455可以正常收到数据,但是如果上电启动等待几分钟后再由PC机向目标板发送数据,则TMS320C6455不能收到数据。

1.请问发生上述情况的原因是什么?

2.能否解释一下DaemonNew函数具体的原理?

谢谢各位!!