Dee.Server¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
Bus address to use for the connection |
||
r/w/co |
Accept connections from current user only |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
||
priv |
r |
Class Details¶
- class Dee.Server(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod bus_address_for_name(name, include_username)¶
- Parameters:
- Returns:
Newly allocated string with bus address. Use
GLib.free
() to free.- Return type:
Helper method which creates bus address string for the given name, which should have the same format as a DBus unique name.
- classmethod new(swarm_name)¶
- Parameters:
swarm_name (
str
) – Name of swarm to join.- Returns:
A newly constructed
Dee.Server
.- Return type:
Creates a new instance of
Dee.Server
and tries to bind toDee.Server
:bus-address
. TheDee.Peer
:swarm-leader
property will be set when the binding succeeds.Note that this function will automatically determine the value of
Dee.Server
:bus-address
property and will generally cause your application to use new socket for everyDee.Server
with different swarm name. SeeDee.Server.new_for_address
() if you’d like to share one connection between multipleDee.Server
instances.
- classmethod new_for_address(swarm_name, bus_address)¶
- Parameters:
- Returns:
A newly constructed
Dee.Server
.- Return type:
Creates a new instance of
Dee.Server
and tries to bind to bus_address. TheDee.Peer
:swarm-leader
property will be set when the binding succeeds.If there is already a
Dee.Server
instance bound to bus_address, the connection will be shared with the newly constructed instance.This function is primarily meant for sharing of one connection (socket) between multiple DeeServers, so that you can create
Dee.Server
instances with varying swarm names, but the same bus address, which will cause them to share the connection (the sharing is possible only within the same process though).
Property Details¶
- Dee.Server.props.bus_address¶
- Name:
bus-address
- Type:
- Default Value:
- Flags:
Bus address to use for the connection