Back to product page

MediatorAddress property


Holds IP address (or hostname) of the mediator.

Type

String.

Syntax

  • C#
  • C++
  • VB.NET
void devP2P.GetMediatorAddress(IntPtr Handle, StringBuilder buffer);
The MediatorAddress(Handle,buffer) syntax has these parts:
HandleReference to the devP2P instance.
bufferBuffer where output is stored.

void devP2P.SetMediatorAddress(IntPtr Handle, string Value);
The MediatorAddress(Handle,Value) syntax has these parts:
HandleReference to the devP2P instance.
ValueNew mediator address to set.

char *MediatorAddress = value;
The MediatorAddress(value) syntax has these parts:
valuePointer to allocated memory where mediator address is stored.

Sub P2P_GetMediatorAddress(ByVal Handle As IntPtr, ByVal buffer As StringBuilder)
The MediatorAddress(Handle,buffer) syntax has these parts:
HandleReference to the devP2P instance.
bufferBuffer where output is stored.

Sub P2P_SetMediatorAddress(ByVal Handle As IntPtr, ByVal Value As String)
The MediatorAddress(Handle,Value) syntax has these parts:
HandleReference to the devP2P instance.
ValueNew mediator address to set.

Remarks

Set this property to hostname of mediator that is used with Search method, together with MediatorPort property. devP2P will send mediator requests to that IP/Port to locate and possibly request connection with remote peer.

UDP connection is used for mediator, to help with UDP hole punching for direct peer-to-peer connection. Even if you use only TCP protocol in Start method, mediator can be used to obtain information about announced TCP ports open by remote peer.

Note that devP2P will remember this property through address reference, so keep your buffers static and valid as long as devP2P needs it. devP2P will not free or touch allocated memory in any way.

Platforms

Windows
Mac OSX
Linux
BSD