aiocoap.transports.simplesocketserver module

This module implements a MessageInterface 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).


  • 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.MessageInterfaceSimpleServer(ctx: aiocoap.interfaces.MessageManager, log, loop)

Bases: aiocoap.transports.generic_udp.GenericMessageInterface

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