Hi all,
We plan to use NDK for data communication between Dsp and host PC. In some cases TCP connection can be closed from Dsp side.
How to do this in correct way?
We slightly changed example application code and tested it on EVM 6457L.
There is no any problem when connection is closed from host PC, but when Dsp finish connection, closing socket using fdClose(s) NDK call, connection doesn't closed, but preserved in FINWAIT2 state, without notifying host, so it continue sending data through connection.
This connection state kept even after processing connection Dsp task ended with fdCloseSession(TaskSelf()) NDK call before exiting task.
Calling explicitly shutdown(stcp, SHUT_RDWR) doesn't help also, as it should be called inside fdClose.
Connection closed actually only after we close it from host PC side.
We tried to do more deep investigation rebuilding NDK with debug information, but it is quite difficult to debug it as debugger intervention break some timing inside TCP stack.
Configuration, we are using now:
TMDS EVM 6457L
NDK : 2.20.6.35
CCS : 5.1.1.00033
Thanks in advance.
PS. We used for testing on host PC very simple application derived from
http://msdn.microsoft.com/en-us/library/windows/desktop/ms737591%28v=vs.85%29.aspx