DDP (Device Discovery Protocol)¶
The DDP module allows for discovery of PS4 devices.
DDP Protocol¶
The pyps4_2ndscreen.ddp.DDPProtocol is a handler for DDP/UDP messages. This class must be used in the event loop. It can handle multiple pyps4_2ndscreen.ps4.Ps4Async objects.
-
class
pyps4_2ndscreen.ddp.DDPProtocol(max_polls=5)¶ Bases:
asyncio.protocols.DatagramProtocolAsync UDP Client.
-
set_max_polls(poll_count: int)¶ Set number of unreturned polls neeeded to assume no status.
-
close()¶ Close Transport.
-
add_callback(ps4, callback)¶ Add callback to list. One per PS4 Object.
-
remove_callback(ps4, callback)¶ Remove callback from list.
-
property
local_port¶ Return local port.
-
property
remote_port¶ Return remote port.
-
property
polls_disabled¶ Return true if polls disabled.
-
-
async
ddp.async_create_ddp_endpoint(port=1987)¶ Create Async UDP endpoint.