dtls_write method

int dtls_write(
  1. Pointer<dtls_context_t> ctx,
  2. Pointer<session_t> session,
  3. Pointer<uint8> buf,
  4. int len,
)

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.

Implementation

int dtls_write(
  ffi.Pointer<dtls_context_t> ctx,
  ffi.Pointer<session_t> session,
  ffi.Pointer<uint8> buf,
  int len,
) {
  return _dtls_write(
    ctx,
    session,
    buf,
    len,
  );
}