On Thu, Dec 1, 2011 at 3:31 PM, Emmanuel Lecharny <[email protected]> wrote:
> Hi,
>
> as I'm trying to implement the SSL layer, I have some suggestion regarding
> the IoSession.
>
> Right now, the session is navigating through different states :
> CREATED, CONNECTED, CLOSING, CLOSED
>
> I have added two more states :
> SECURING, SECURED
>
> The possible transition are :
>
> o--> CREATED
> CREATED --> CONNECTED, CLOSING, SECURING
> CONNECTED --> CLOSING
> CLOSING --> CLOSED
> CLOSED --o
> SECURING --> SECURED, CLOSING
> SECURED --> CLOSING
>
> At first it seems enough, but when it comes to deal with TLS, we may need to
> switch from a CONNECTED state to a SECURING state, and the very same for
> SECURED --> CONNECTED. That adds two more transitions :
> CONNECTED --> SECURING
> SECURED --> CONNECTED
>
> We could also add an IDLE and an IDLE_SECURED states, to manage idle
> sessions. That's 6 more transitions :
> CONNECTED --> IDLE
> SECURED --> IDLE_SECURED
> IDLE --> CONNECTED, CLOSING
> IDLE_SECURED --> SECURED, CLOSING
>
> We could even think about two other possible transitions, to deal with a
> switch from an idle session to a secured session (or the same for a secure
> idle session) :
> IDLE --> SECURING
> IDLE_SECURED --> CONNECTED
>
if there is some processing(here securing/handshake) going on can that
session still be considered as in IDLE state?
(IMO not)
> So here is the full transition table :
> o--> CREATED
> CREATED --> CONNECTED, CLOSING, SECURING
> CONNECTED --> CLOSING, SECURING, IDLE
> CLOSING --> CLOSED
> CLOSED --o
> SECURING --> SECURED, CLOSING
> SECURED --> CLOSING, CONNECTED, IDLE_SECURED
> IDLE --> CONNECTED, CLOSING, SECURING
> IDLE_SECURED --> SECURED, CLOSING, CONNECTED
>
> I'm over the roof ?
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>



-- 
Kiran Ayyagari

Reply via email to