@@ -83,10 +83,14 @@ cdef extern from "tinydtls/dtls.h":
unsignedcharreadbuf[1400]#DTLS_MAX_BUF
ctypedefstructdtls_handler_t:
int (*write)(dtls_context_t*ctx,session_t*session,uint8*buf,size_tlen)
int (*read)(dtls_context_t*ctx,session_t*session,uint8*buf,size_tlen)
int (*event)(dtls_context_t*ctx,session_t*session,dtls_alert_level_tlevel,unsignedshortcode)
int (*get_psk_info)(dtls_context_t*ctx,constsession_t*session,dtls_credentials_type_ttype,constunsignedchar*desc,size_tdesc_len,unsignedchar*result,size_tresult_length)
int (*write)(dtls_context_t*ctx,session_t*session,uint8*buf,size_tlen)except-1
# Actually, the return value is ignored by tinydtls; -1 is used for errors
# for consistency with write and get_psk_info
int (*read)(dtls_context_t*ctx,session_t*session,uint8*buf,size_tlen)except-1
# Actually, the return value is ignored by tinydtls; -1 is used for errors
# for consistency with write and get_psk_info
int (*event)(dtls_context_t*ctx,session_t*session,dtls_alert_level_tlevel,unsignedshortcode)except-1
int (*get_psk_info)(dtls_context_t*ctx,constsession_t*session,dtls_credentials_type_ttype,constunsignedchar*desc,size_tdesc_len,unsignedchar*result,size_tresult_length)except-1