coapthon.client package

Submodules

coapthon.client.coap module

class coapthon.client.coap.CoAP(server, starting_mid, callback, sock=None, cb_ignore_read_exception=None, cb_ignore_write_exception=None)[source]

Bases: object

Client class to perform requests to remote servers.

close()[source]

Stop the client.

current_mid[source]

Return the current MID.

Returns:the current mid
end_observation(token)[source]

Remove an observation token from our records.

Parameters:token – the token for the observation
receive_datagram()[source]

Receive datagram from the UDP socket and invoke the callback function.

send_datagram(message)[source]

Send a message over the UDP socket.

Parameters:message – the message to send
send_message(message)[source]

Prepare a message to send on the UDP socket. Eventually set retransmissions.

Parameters:message – the message to send

Module contents