dtls_write

Function dtls_write 

Source
pub unsafe extern "C" fn dtls_write(
    ctx: *mut dtls_context_t,
    session: *mut session_t,
    buf: *mut uint8,
    len: usize,
) -> c_int
Expand description

Writes the application data given in @p buf to the peer specified by @p session.

@param ctx The DTLS context to use. @param session The remote transport address and local interface. @param buf The data to write. @param len The actual length of @p data.

@return The number of bytes written, @c -1 on error or @c 0 if the peer already exists but is not connected yet.