Subject: IMAP with Asynchronous Sockets

From: Gangadhar Mylapuram <[email-masked]>
Date: Wed, 3 Sep 2003 05:02:35 -0700 (PDT)

Hi All,
 
Have anybody worked on asynchronous sockets for IMAP client development.
 
If so, Please let me the way to handle these asynchronous events in perspective of IMAP.
 
>From my understanding, we need to make FSM to handle these events upon our actual protocol FSM. 
 
But i am unable to visulise the states of this new FSM.
 
Any comments and suggetions are Welcome.
 
Thanks and Regards
Gangadhar

---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

---

From: Mark Crispin <[email-masked]>
Date: Wed, 3 Sep 2003 08:54:39 -0700 (PDT)

The correct way of looking at IMAP is to see it as two protocols.

One protocol sends commands from the client, and at some later time it
gets a completion response from the server.  The client may send more than
one command at a time if the execution order of those commands does not
matter (refer to the text in RFC 3501 about multiple commands in progess).

The other protocol receives data from the server, and updates the client's
cache of the data.

Non-blocking sockets can be used to implement this.

This does not lend itself to an FSM very well.  A queue is a better model.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.