udp#

Description#

Plugin for raw UDP communications.

Configuration#

udp:
    # No configuration required

Actions#

Module reference#

class platypush.plugins.udp.UdpPlugin(**kwargs)[source]#

Bases: Plugin

Plugin for raw UDP communications.

__init__(**kwargs)#
send(data: bytes | str, host: str, port: int, binary: bool = False, timeout: float | None = None, recv_response: bool = False, **recv_opts)[source]#

Send data over a UDP connection.

Parameters:
  • data – Data to be sent, as bytes or string.

  • host – Host IP/name.

  • port – TCP port.

  • binary – If set to True and data is a string then will be treated as base64-encoded binary input.

  • timeout – Connection timeout in seconds (default: None).

  • recv_response – If True then the action will wait for a response from the server before closing the connection. Note that recv_opts must be specified in this case - at least length.