You are viewing a plain text version of this content. The canonical link for it is here.
Posted to websh-user@tcl.apache.org by Jerry Lam <bo...@hotmail.com> on 2003/11/28 22:06:22 UTC

session::init or session::new

Hi,

I wonder what is the difference between init and new because I can do the same thing with session::init to create a new session. What is the difference between them?

Thanks,

Jerry

Re: session::init or session::new

Posted by Jerry Lam <bo...@hotmail.com>.
Hi,

Both of them take an id argument. If I supply an existing id to
session::new, will it reuse the old one with the stored value intact? or
simply it will reuse the same id without any value stored in it?

Thanks,

Jerry
----- Original Message ----- 
From: "Ronnie Brunner" <ro...@netcetera.ch>
To: "Jerry Lam" <bo...@hotmail.com>
Cc: <we...@tcl.apache.org>
Sent: Sunday, November 30, 2003 8:43 AM
Subject: Re: session::init or session::new


> session::init initializes a session if a known session id is present,
> otherwise it creates a new session.
>
> if you still want to create a new session even if you have a
> session id already: use session::new, which never initializes an
> already existing session
>
> Ronnie
> ----------------------------------------------------------------------
> Ronnie Brunner                             ronnie.brunner@netcetera.ch
> Netcetera AG, 8040 Zuerich   phone +41 1 247 79 79 fax +41 1 247 70 75
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: websh-user-unsubscribe@tcl.apache.org
> For additional commands, e-mail: websh-user-help@tcl.apache.org
>
>

Re: session::init or session::new

Posted by Ronnie Brunner <ro...@netcetera.ch>.
session::init initializes a session if a known session id is present,
otherwise it creates a new session.

if you still want to create a new session even if you have a
session id already: use session::new, which never initializes an
already existing session

Ronnie
----------------------------------------------------------------------
Ronnie Brunner                             ronnie.brunner@netcetera.ch
Netcetera AG, 8040 Zuerich   phone +41 1 247 79 79 fax +41 1 247 70 75