Wip_close issue

Hello all,

I am using an Q2686 processor with the following:
Firmeare 7.2.0.00
WIP plugin 5.0.0.2040 or 5.10.0.2050

Can someone tell me what is the correct procedure to close a TCP socket created with ‘wip_TCPClientCreateOpts’?

I am managing to open the port successfully but when I try to close it tidily with ‘wip_close’ i receive a WIP_CERR_INVLAID (-994) error. I do understand this error in the fact that it suggests that I have supplied a NULL channel type but the fact is I have not. What follows is a section of my debug output:

.
.
[TASK] - MessageTimeSlot: CLOSING TCP
[TCP] - TCP_Close: Channel: 0x180ca8a8
[TCP] - TCP_Close: FAILED: -994
.
.

This clearly shows that the channel is not of a NULL type.

Any help would be usefull.

Regards

Barry

It’s not NULL - but is 0x180ca8a8 a valid channel that’s in a valid state…?

Thanks awneil,

That is a true statement and after making this post I realised.

However, what’s the best way to check that the channel is valid and in a valid state?

I have read (via one of your posts) that you should close a channel by using wip_shutdown followed by wip_close when the WIP_CEV_PEER_CLOSE event has occurred. Is this still a valid procedure? I have tried this and the channel now appears to close properly.