Method of Maintaining a Connection and Electronic Apparatus Using the Same
Abstract
A method of maintaining a network connection is used between an electronic apparatus and a server. The method includes the following steps: (a) sending an Nth test packet to the server, and the Nth test packet requests that the server reply to the electronic apparatus after waiting for an Nth time interval; (b) determining whether a reply for the Nth test package is received; (c) repeating step (a) if the reply for the Nth test packet is received; and calculating a period from the (N−1)th test packet being sent to the reply from the server being received if the reply for the Nth test packet is not received; and (d) sending a keep-alive packet periodically to the server according to the period for maintaining a connection between the electronic apparatus and the server when the electronic apparatus is switched to a standby/sleep mode.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A method of maintaining a network connection, applied to an electronic apparatus, wherein the electronic apparatus comprises a test module, used for maintaining a connection between the electronic apparatus and a server, the method comprising:
(a) via the test module, actively sending an Nth test packet to the server, and the Nth test packet requests that the server reply to the electronic apparatus after waiting for an Nth time interval, wherein N is a positive integer; (b) via the test module, determining whether a reply for the Nth test packet is received, wherein the reply is sent by the server; (c) repeating step (a) if the reply for the Nth test packet is received, and calculating a time from an (N−1)th test packet being sent to the reply from the server being received as a period via the test module, if the reply for the Nth test packet is not received; and (d) sending a keep-alive packet to the server according to the period for maintaining a connection between the electronic apparatus and the server when the electronic apparatus is switched to a standby/sleep mode.
2 . The method of maintaining a network connection as claimed in claim 1 , wherein in step (b), determining whether a time for waiting for the server to reply exceeds a packet round-trip time plus a sum of N time intervals, the packet round-trip time being the total time from a packet being sent from the electronic apparatus to the server to an immediate reply from the server being received.
3 . The method of maintaining a network connection as claimed in claim 2 , wherein when N=1, if the reply for the 1st test packet sent by the server is not received, the packet round-trip time is determined to be the period.
4 . The method of maintaining a network connection as claimed in claim 1 , wherein the time interval is 5 to 20 seconds.Join the waitlist — get patent alerts
Track US2016156549A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.