[][src]Function pact_mock_server_ffi::create_mock_server_for_pact

#[no_mangle]pub extern "C" fn create_mock_server_for_pact(
    pact: PactHandle,
    addr_str: *const c_char
) -> i32

External interface to create a mock server. A Pact handle is passed in, as well as the port for the mock server to run on. A value of 0 for the port will result in a port being allocated by the operating system. The port of the mock server is returned.

Errors

Errors are returned as negative values.

ErrorDescription
-1An invalid handle was received
-3The mock server could not be started
-4The method panicked
-5The address is not valid