Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Could anybody please Tell me

What is PPP connection? What is Linger Time ?
Can I initiate web connection when linger timer is active?

What checks should i make before calling IWEB_getResponse() ?

Hey
Below is my answer:
- PPP connection:
PPP means "Point to Point" protocol, and it is the way by which most of Internet Service providers (ISPs) make it possible for their clients to connect.
- Linger time:
Linger means client socket keep connecting to server socket. And linger time is the time to keep this connection.
If the time is negative, only gets the current value. If the time is zero, turns linger off. If time is positive, sets the linger time to it.
So after a network transaction, if still in the linger time, new network request will use the old socket, no need set up the connection again.
- Can I initiate web connection when linger timer is active?
Yes, u can.
- What checks should i make before calling IWEB_getResponse() ?
No need check the linger time, you just need check your IWeb instance is valid.

Hey
Below is my answer:
- PPP connection:
PPP means "Point to Point" protocol, and it is the way by which most of Internet Service providers (ISPs) make it possible for their clients to connect.
- Linger time:
Linger means client socket keep connecting to server socket. And linger time is the time to keep this connection.
If the time is negative, only gets the current value. If the time is zero, turns linger off. If time is positive, sets the linger time to it.
So after a network transaction, if still in the linger time, new network request will use the old socket, no need set up the connection again.
- Can I initiate web connection when linger timer is active?
Yes, u can.
- What checks should i make before calling IWEB_getResponse() ?
No need check the linger time, you just need check your IWeb instance is valid.

If there are too many sockets in linger time, so cann't create a new connection, which URL is different to others.
how can deal with this condition?
if delay creating the new connection, how can I judge the the error is coming from full of device sockets , and when can get an idle socket to create the connection?
Thank you for advise.

If there are too many sockets in linger time, so cann't create a new connection, which URL is different to others.
how can deal with this condition?
if delay creating the new connection, how can I judge the the error is coming from full of device sockets , and when can get an idle socket to create the connection?
Thank you for advise.

qier86 wrote:If there are too many sockets in linger time, so cann't create a new connection, which URL is different to others.
Not right, socket in linger time means this socket is still keep connection to server, so it in 2 status: 1- not available, because it's in writing/receiving status, 2- available, it's in idle status.
qier86 wrote:how can I judge the the error is coming from full of device sockets , and when can get an idle socket to create the connection?
If all sockets in transaction status, try ISocket * INETMGR_OpenSocket(INetMgr * pINetMgr, NetSocket Type); the return value should be NULL, and call INETMGR_GetLastError() will get the error code AEE_NET_GENERAL_FAILURE which means An ISocket could not be allocated.
Hope it can offer any help.

qier86 wrote:If there are too many sockets in linger time, so cann't create a new connection, which URL is different to others.
Not right, socket in linger time means this socket is still keep connection to server, so it in 2 status: 1- not available, because it's in writing/receiving status, 2- available, it's in idle status.
qier86 wrote:how can I judge the the error is coming from full of device sockets , and when can get an idle socket to create the connection?
If all sockets in transaction status, try ISocket * INETMGR_OpenSocket(INetMgr * pINetMgr, NetSocket Type); the return value should be NULL, and call INETMGR_GetLastError() will get the error code AEE_NET_GENERAL_FAILURE which means An ISocket could not be allocated.
Hope it can offer any help.