Function tari_wallet_ffi::transport_tor_create [−][src]
#[no_mangle]pub unsafe extern "C" fn transport_tor_create(
control_server_address: *const c_char,
tor_cookie: *const ByteVector,
tor_port: c_ushort,
socks_username: *const c_char,
socks_password: *const c_char,
error_out: *mut c_int
) -> *mut TariTransportType
Creates a tor transport type
Arguments
control_server_address
- The pointer to a char array
tor_cookie
- The pointer to a ByteVector containing the contents of the tor cookie file, can be null
tor_identity
- The pointer to a ByteVector containing the tor identity, can be null.
tor_port
- The tor port
socks_username
- The pointer to a char array containing the socks username, can be null
socks_password
- The pointer to a char array containing the socks password, can be null
error_out
- Pointer to an int which will be modified to an error code should one occur, may not be null. Functions
as an out parameter.
Returns
*mut TariTransportType
- Returns a pointer to a tor TariTransportType, null on error.
Safety
The transport_type_destroy
method must be called when finished with a TariTransportType to prevent a memory
leak