diff --git a/src/PactNet/Drivers/HttpPactDriver.cs b/src/PactNet/Drivers/HttpPactDriver.cs index 8c010144..52026bff 100644 --- a/src/PactNet/Drivers/HttpPactDriver.cs +++ b/src/PactNet/Drivers/HttpPactDriver.cs @@ -40,8 +40,7 @@ public IHttpInteractionDriver NewHttpInteraction(string description) /// Failed to start mock server public IMockServerDriver CreateMockServer(string host, int? port, bool tls) { - string addrStr = $"{host}:{port.GetValueOrDefault(0)}"; - int result = NativeInterop.CreateMockServerForPact(this.pact, addrStr, tls); + int result = NativeInterop.CreateMockServerForTransport(this.pact, host, (ushort)port.GetValueOrDefault(0), "http", null); if (result > 0) { diff --git a/src/PactNet/Interop/NativeInterop.cs b/src/PactNet/Interop/NativeInterop.cs index 71aeabff..92bdc911 100644 --- a/src/PactNet/Interop/NativeInterop.cs +++ b/src/PactNet/Interop/NativeInterop.cs @@ -15,8 +15,8 @@ internal static class NativeInterop #region Http Interop Support - [DllImport(DllName, EntryPoint = "pactffi_create_mock_server_for_pact")] - public static extern int CreateMockServerForPact(PactHandle pact, string addrStr, bool tls); + [DllImport(DllName, EntryPoint = "pactffi_create_mock_server_for_transport")] + public static extern int CreateMockServerForTransport(PactHandle pact, string addrStr, ushort port, string transport, string transportConfig); [DllImport(DllName, EntryPoint = "pactffi_mock_server_mismatches")] public static extern IntPtr MockServerMismatches(int mockServerPort);