Hi.
I use TMDSEVM6678LE and trying to build a network application.
I found client sample project (from C:\ti\mcsdk_2_01_02_05\examples\ndk\client) and build and it works well.
The project use simple echo server routine named ndtask_tcp_echo() and when the remote echo client disconnect, recvnc returns 0 and fdError return error code. (This is fine.)
But when I remove recvnc function and just send simple "hello" message like below code, send function nor fdError never returns error code.
while (TRUE) {
i = send(hSock, "hello\r\n", strlen("hello\r\n"), 0);
System_printf("sent %d %d\n", i, fdError() );
if ( i <= 0 ) {
System_printf ("Send connection Closed\n");
break;
}
platform_delay(100 * 1000);
}
The reason I mention this is I want implement some kind of streaming server which client simply connect to server(without send request) and server send streaming data to client until client disconnect the session.
For above situation, server cannot detect when the client disconnect session.
So, I want to know how server can detect client connection status without recv function call.
Regards,
Brian.