That's not persistency, that's global state. Each connection has its own
state, but you can use global state as well, via modules, for example. E.g.

conn1.modules.__main__.foo = 5
print conn2.modules.__main__.foo

If you want to persist the data, just pickle it on the server and load it
again when you restart, or have the first client do that
On Mar 29, 2015 4:35 AM, "Bart Bortnik" <[email protected]> wrote:

> Hello,
>
> Can objects on the server be persistent?  In other words, if one
> connection changes the value of an integer and then disconnects, can a
> second connection connect and read the value of the integer that was
> assigned by the first connection?
>
> It seems like objects are not persistent.  To test, I created a
> ThreadedServer and then connected two clients to the server.  The Service
> sublcass had an "exposed" function that sets and gets a simple a integer
> variable.  The first client set the value to 5.  The second client however
> did not read the value 5.
>
> How do I make it so that both clients are able to access the *same*
> object/value?
>
> Thanks,
> Bart
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "rpyc" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"rpyc" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to