For example, how does the phone “know” that it has a new email if it does not manually check the server for a new message?
PUSH implementations vary by protocol, but the principles remain the same. A connection is maintained between the client and the server, and the client is notified by the server of new events. This uses less bandwidth and usually leads to faster interaction than the client periodically asking the server if any new events are expected.
As a demo, this is how PUSH IMAP mail (known as IDLE) works:
- The client registers with the email server as usual.
- During the login process, the server reports that it is capable of
IDLE . - The client checks and downloads new messages as usual.
- Instead of periodically polling for new messages, the client issues an
IDLE command. - The session between the server and the client remains calm.
- When new mail arrives, and the server notifies that the messages are
EXISTS . - The client can then exit
IDLE mode with DONE and download these messages. - Repeat step 4.
source share