But it doesn’t seem to work!
After making a GET or PUT request, I receive the CEV_PEER_CLOSE event, and call wip_close to, “close the channel and make the session ready for another request” - as the guide says (see above).
But the next request (GET or PUT) will always fail with CERR_ABORTED, “channel closed by server”
After this failure, the next request (GET or PUT) will always work!
It looks like the wip_close is not correctly making the channel ready for another request!
These are the traces at the end of a successful request, on the CEV_PEER_CLOSE event:
wip_close=0 [WIP] closing HTTP_DATA 0x180c43e4 [HTTP] destroy request @ 180c43e4 [WIPEV] WIP_CEV_PEER_CLOSE @ TCPCLIENT 0x180c4684 [req_event] WIP_CEV_PEER_CLOSE
In this case, note that only HTTP_DATA is closed.
And these are the traces at the end of a failed request, on the CEV_ERROR (CERR_ABORTED) event:
wip_close=0 [WIP] closing TCPCLIENT 0x180c4684 [WIP] closing HTTP_DATA 0x180c4964 [HTTP] destroy request @ 180c4964
In this case, note that both HTTP_DATA and TCPCLIENT are closed - and, after this, the next request will work.
The code is the Wavecom WIP HTTP GET sample from the SDK;
The [WIP] and [WIPEV] and [HTTP] and [req_event] are internal traces from WIP itself.
So, what’s going wrong here? Why is wip_close not doing its job?