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.
大家好,我用的是TMS320 674X的芯片,仿真软件为CCS_v5,现在我想用NDK里面的和TCP有关的程序来实现DSP和PC的数据传输,用DaemonNew 回调经过改写过后的 dtask_tcp_echo函数向PC机进行发送数据,里面的send函数是面向连接的。现在我想向PC发4M字节的数,我的和发送数据部分有关的程序 如下:
for(;;)
{
i = (int)recv( s, (void **)recv_buffer, sizeof(recv_buffer), 0);
// If we read data, start sending until finish
if(i > 0 )
{
while(1)
{
for(j=0; j<2000; j++) {}
if(send( s, (void*)xmit_buffer, 2*LEN, 0 ) > 0);
{
count++;
}
if(count > back)
{
break;
}
}
// if finished sending wait for next time
Semaphore_post(sem);
}
// If the connection got an error or disconnect, close
else
break;
}
recv_buffer 用来接收来自PC端的握手信号,xmit_buffer里面存着待发送的4M字节的数据,问题如下:
1.dtask_tcp_echa用的是不是TCP协议?
2.send函数里面有发送的buffer的长度(2*LEN)最大只能设置1024字节,为什么设置大一点就不能发送数据呢?