Hi,
I have c6678 ,ndk 2.00.04.26, SYS/BIOS 6.32.05.54
my project is based on tcp server in client ndk example. In the daemon server function, each iteration of the loop I use fdPoll to wait for the file descriptor event for 1 ms.
I receive a buffer by recvnc and send by mailbox to another task (inbox) , receive a buffer back from the task by another mailbox (outbox) and send it back by send function.
Part of the code:
int dtask_tcp_echo( SOCKET s, UINT32 unused )
{
.....
FDPOLLITEM dPollIt[1];
fdPollIt[0].fd=s;
fdPollIt[0].eventsRequested=POLLIN;
for(;;)
{
if(fdPoll(fdPollIt,1,1)>0)
{
length = (int)recvnc( s, (void **)&pBuf,MSG_DONTWAIT, &hBuffer );
if (length>0)
{
Mailbox_post(inbox,pBuf,timeout);
if (Mailbox_pend(outbox,outBuf,timeout)!=0)
{
succSend=send( s, outBufCpy, outLength, 0 );
}
}
}
}
In the first iteration of the for loop it works o.k. next time there is an error in fdpoll :
[C66xx_0] Internal exception: IERR=0x10
[C66xx_0] Resource conflict exception
[C66xx_0] ti.sysbios.family.c64p.Exception: line 248: E_exceptionMin: pc = 0x80309ec0, sp = 0x008605e0.
[C66xx_0] xdc.runtime.Error.raise: terminating execution
Thanks
Aviv