Function indy::api::agent::indy_agent_send [] [src]

#[no_mangle]
pub extern "C" fn indy_agent_send(
    command_handle: i32,
    connection_handle: i32,
    message: *const c_char,
    cb: Option<extern "C" fn(_: i32, _: ErrorCode)>
) -> ErrorCode

Sends message to connected agent.

Note that this call works for both incoming and outgoing connections. Note that messages encryption/decryption will be performed automatically.

Params

command_handle: command handle to map callback to caller context. connection_handle: Connection handle returned by indy_agent_connect or indy_agent_listen calls. message: Message to send. cb: Callback that will be called after message sent or on error. Will be called exactly once.

Returns

err: Error code cb: - xcommand_handle: Command handle to map callback to caller context. - err: Error code

Errors