aiocoap.transports.simplesocketserver module

This module implements a TransportEndpoint for UDP based on the asyncio DatagramProtocol.

This is a simple version that works only for servers bound to a single unicast address. It provides a server backend in situations when udp6 is unavailable and simple6 needs to be used for clients.

While it is in theory capable of sending requests too, it should not be used like that, because it won’t receive ICMP errors (see below).

Shortcomings

  • This implementation does not receive ICMP errors. This violates the CoAP
    standard and can lead to unnecessary network traffic, bad user experience (when used for client requests) or even network attack amplification.
  • This transport is experimental and likely to change.
class aiocoap.transports.simplesocketserver.TransportEndpointSimpleServer(ctx: aiocoap.interfaces.MessageManager, log, loop)

Bases: aiocoap.transports.generic_udp.GenericTransportEndpoint

classmethod create_server(server_address, ctx: aiocoap.interfaces.MessageManager, log, loop)