Back to product page

MediatorPort property


Holds port of the mediator.

Type

Integer.

Syntax

  • C#
  • C++
  • VB.NET
void devP2P.SetMediatorPort(IntPtr Handle, int Value);
The MediatorPort(Handle,value) syntax has these parts:
HandleReference to the devP2P instance.
valuePort where mediator listens.

int devP2P.GetMediatorPort(IntPtr Handle);
The MediatorPort(Handle) syntax has these parts:
HandleReference to the devP2P instance.
Return valueInteger value representing mediator's port.

int MediatorPort = value;
The MediatorPort(value) syntax has these parts:
valueInteger value representing mediator's port.

Sub P2P_SetMediatorPort(ByVal Handle As IntPtr, ByVal Value As Integer)
The MediatorPort(Handle,value) syntax has these parts:
HandleReference to the devP2P instance.
valuePort where mediator listens.

Function P2P_GetMediatorPort(ByVal Handle As IntPtr) As Integer
The MediatorPort(Handle) syntax has these parts:
HandleReference to the devP2P instance.
Return valueInteger value representing mediator's port.

Remarks

Set this property to port where mediator listens for Search method, together with MediatorAddress 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.


Platforms

Windows
Mac OSX
Linux
BSD