3

i have been using for a while application tethering with Delphi and i have discovered what its seems to be a bug. Trying to connect two applications in the same network on two pcs with multiple intefaces (VirtualBox or VMware adapters) doesn't work. I tried using the target parameter in AutoConnect or DiscoverManagers, but they could not pair or connect. It seems that the adapter in TTetheringManager binds to the incorrect network adapter and it is impossible for the client to discover this manager. Any ideas?. I'm using Delphi Seattle.

1 Answers1

0

I know that is not the best solution, but worked to me.

I created a new property in TTetheringManager class:

...

private

FServerAddress: string;

...

public

property ServerAddress: string read FServerAddress write FServerAddress;

...

Then, I changed the following method:

function TTetheringManagerCommunicationThread.CreateManagerInfo(const AIdentifier, AName, AText,

  AConnectionString: string; AVersion: Integer): TTetheringManagerInfo;

begin
  Result.ManagerIdentifier := AIdentifier;
  Result.ManagerName := AName;
  Result.ManagerText := AText;
  Result.ConnectionString := AConnectionString;
  Result.Version := AVersion;

  if (Trim(FAdapter.Manager.FServerAddress) <> '') then
    begin
      FAdapter.FAdapterConnectionString := Copy(FAdapter.FAdapterConnectionString, Pos('$', FAdapter.FAdapterConnectionString), Length(FAdapter.FAdapterConnectionString));
      FAdapter.FAdapterConnectionString := FAdapter.Manager.ServerAddress + FAdapter.FAdapterConnectionString;
    end;

  Result.Adapter := FAdapter;
end;

So, I set the property ServerAddress before to enable the TetheringManager.

I hope to helped.