KeepAlive interval


#1

HI

Im working with a Fastrack supreme 20 and Wipsoft 5.10.2020

Im creating a TCP client socket with the following line:

ClientSocket = wip_TCPClientCreateOpts(PEER_STRADDR, SERVER_PORT, evh,NULL,WIP_COPT_NODELAY,true, WIP_COPT_KEEPALIVE,true,WIP_COPT_END);

Ive read in the forum the WIP_COPT_KEEPALIVE is default off and fires every 2 hours.

I want to know if it is possible to increase the interval, if so, would I have to modify my socket creation command.

Thank You


#2

Hiya,

Have a look at the wip_TCPClientCreateOpts() function.

Section 6.5.4.2 in the WIP Connectivity Guide describes the options available - one is WIP_COPT_KEEPALIVE - this may do what you want…

ciao, Dave


#3

hi

Thanks for the reply.

Ive had a look at the Docs and im a little confused as how to create the channel with these options.

wip_TCPClientCreateOpts(PEER_STRADDR, SERVER_PORT, evh,NULL,WIP_COPT_NODELAY,true, WIP_COPT_KEEPALIVE,true,WIP_COPT_END);

this is what I currently have,

According to the doc it should be: WIP_COPT_KEEPALIVE,1

Does the 1 represent true-false(0,1) or 1 x 10 millisecond , specifying the package send interval

thank you


#4

Hiya,

According to my interpretation of the Docs I have here, it’s 1 x 10 millisecond.

Why do you think it means 'TRUE"?

ciao, Dave


#5

hi

I found the following post indicating that the parameter is boolean

Thanks


#6

Hiya,

Thanks for your link to the other post. Now I’m really confused.

I guess it’s time to go and hassle your Wavecom Distributor.

ciao, Dave


#7

Hey

Your are right…!!! :blush: The WIP_COPT_KEEPALIVE parameter is actually a boolean and not an u32, that means one can only set the keep alive mechanism on or off, but not set its timer duration, which is set to 75 seconds( i am not sure where you read 2 hrs :open_mouth: ) . Hence reading a value of 1 (TRUE) for WIP_COPT_KEEPALIVE means it is activated, while reading 0 (FALSE = default value) means it is deactivated…

Hope it helps you… :unamused:


#8

Can your app’ send dummy packets every 40 seconds?