Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.

prop.Prop only supports one connection #45

Open
alexlarsson opened this issue Dec 9, 2013 · 2 comments
Open

prop.Prop only supports one connection #45

alexlarsson opened this issue Dec 9, 2013 · 2 comments

Comments

@alexlarsson
Copy link

If you have an object that is exposed on multiple connections (for instance one in a server that allows peer-to-peer connections) it cannot use the current properties support, because it is tied to a specific connection. It should be possible to create the Prop type without reference to an existing connection, and then later export it on one or more connections as they arrive.

@guelfey
Copy link
Owner

guelfey commented Dec 9, 2013

A value of the Prop type needs to have some kind of reference to the connection because it may need to send signals to the message bus, and it has no way of obtaining it from a method call. I'm planning to merge the functionality of the prop and introspect packages into the main package in the long run, which should fix this issue then.

@alexlarsson
Copy link
Author

Well, obviously a property is not very useful if never gets exposed on a
connection. However it is still useful to be able to have a property object
that is not currently exposed on a connection. For instance, if you are
implementing a dbus server that accepts client peer to peer connections
(like eg the dbus daemon). In such a setup you want to create a new prop
object that keeps the current state, and then whenever a new client
connects you add that connection to the list of connections that the prop
sends signals to.

This would have an api something like:
prop = NewProp()
prop.Expose(conn1, path)
On Dec 9, 2013 5:56 PM, "guelfey" [email protected] wrote:

A value of the Prop type needs to have some kind of reference to the
connection because it may need to send signals to the message bus, and it
has no way of obtaining it from a method call. I'm planning to merge the
functionality of the prop and introspect packages into the main package in
the long run, which should fix this issue then.


Reply to this email directly or view it on GitHubhttps://github.com//issues/45#issuecomment-30149348
.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants