IPWorks P2P 2020 Kotlin Edition

Questions / Feedback?

Turn Configuration

The component accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the component, access to these internal properties is provided through the Config method.

TURN Configuration Settings

AllocateAddressFamily:   Which address family to request an allocation for.

This setting controls which address family the component should request an allocation from the server for. It must be set to one of the following:

  • 0 (default): Request an IPv4 allocation.
  • 1: Request an IPv6 allocation.
  • 2: Request a dual allocation (IPv4 and IPv6).
DontFragment:   Whether the DONT-FRAGMENT attribute should be included in applicable requests.

This setting controls whether the component includes the DONT-FRAGMENT attribute when sending new allocation requests (with Allocate) and data indications (with SendData).

By default, this setting is disabled, and the component will not include the DONT-FRAGMENT attribute in the aforementioned requests.

DTLSSRTPCompatibility:   Whether to restrict the channel number range for DTLS-SRTP collision avoidance.

This setting indicates whether the component should restrict its channel number range to 0x4000 through 0x4FFF (as specified by the newer TURN RFC 8656, in section 12) for DTLS-SRTP multiplexing collision avoidance reasons.

By default, this setting is disabled, and the component uses the wider range of channel numbers 0x4000 through 0x7FFF specified by the older TURN RFC 5766.

EvenPort:   Whether an even port should be allocated.

This setting controls whether the component should request that an even port be allocated when Allocate is called. If this setting is enabled, the server will either allocate an even port, or return an error response.

By default, this setting is disabled, allowing the server to allocate any port of its choosing to fulfill the allocation request.

EvenPortReserveNext:   Whether the server should also reserve the port immediately following the even port.

If the EvenPort setting is enabled, then this setting may be enabled to have the component request that the server create and reserve an additional allocation using the port that immediately follows the even port used to fulfill the allocation request. If the EvenPort setting is disabled, this setting has no effect.

If enabled, the server will attempt to allocate both an even port and the port immediately following it. If successful, the RelayedPort property will reflect the chosen even port after the call to Allocate returns. Additionally, the ReservationToken setting will be populated with a token representing the reserved allocation.

To claim the reserved allocation, create an additional instance of the component, copy the ReservationToken value to that instance, populate any properties needed for authentication, and then call its Allocate method. The server is required to hold the reserved allocation for at least 30 seconds (though it may choose to hold it longer); if the reservation expires before the allocation is claimed, the reservation token will no longer be valid.

By default, this setting is disabled, and the component will not request that the server reserve an additional allocation.

LogLevel:   Specifies the level of detail that is logged.

This setting controls the level of detail that is logged through the Log event. Possible values are:

0 (None) No messages are logged.
1 (Info - Default) Informational events such as SSH handshake messages are logged.
2 (Verbose) Detailed data such as individual packet information is logged.
3 (Debug) Debug data including all relevant sent and received bytes are logged.

ReservationToken:   A token used to claim a reserved allocation.

This setting specifies the reservation token returned by the server. Reservation tokens are used to claim a previously-reserved allocation. Refer to the EvenPortReserveNext setting for more information.

STUN Configuration Settings

AuthType:   Overrides the authentication type used by the component.

This setting can be set to a non-zero value to override the authentication type used by the component. Possible values are:

  • 0 (default): The component will automatically choose between long-term authentication and OAuth authentication.
  • 1: Forces the component to use short-term authentication.
  • 2: Forces the component to use long-term authentication.
  • 3: Forces the component to use OAuth authentication.

Note: This setting cannot be changed while Active is True; attempting to do so will generate an error.

LogLevel:   Specifies the level of detail that is logged.

This setting controls the level of detail that is logged through the Log event. Possible values are:

0 (None) No messages are logged.
1 (Info - Default) Informational events such as SSH handshake messages are logged.
2 (Verbose) Detailed data such as individual packet information is logged.
3 (Debug) Debug data including all relevant sent and received bytes are logged.

Nonce:   The nonce value being used for authentication currently.

This setting can be queried to get the nonce value currently being used for authentication. It will be empty if a nonce is not being used currently.

RemoteSoftware:   The software string reported by the server.

This setting can be queried to obtain the string reported by the server in the SOFTWARE attribute. It will return empty string if the last packet received from the server did not contain a SOFTWARE attribute.

UDPPort Configuration Settings

CaptureIPPacketInfo:   Used to capture the packet information.

If this is set to true, the component will capture the IP packet information.

The default value for this setting is False.

Note: This setting is only available in Windows.

DestinationAddress:   Used to get the destination address from the packet information.

If CaptureIPPacketInfo is set to true, then this will be populated with the packet's destination address when a packet is received. This information will be accessible in the DataIn event.

Note: This setting is only available in Windows.

DontFragment:   Used to set the Don't Fragment flag of outgoing packets.

When set to True, packets sent by the component will have the Don't Fragment flag set. The default value is False.

LocalHost:   The name of the local host through which connections are initiated or accepted.

The LocalHost setting contains the name of the local host as obtained by the gethostname() system call, or if the user has assigned an IP address, the value of that address.

In multi-homed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the component initiate connections (or accept in the case of server components) only through that interface.

If the component is connected, the LocalHost setting shows the IP address of the interface through which the connection is made in internet dotted format (aaa.bbb.ccc.ddd). In most cases, this is the address of the local host, except for multi-homed hosts (machines with more than one IP interface).

LocalPort:   The port in the local host where the component binds.

This must be set before a connection is attempted. It instructs the component to bind to a specific port (or communication endpoint) in the local machine.

Setting this to 0 (default) enables the system to choose a port at random. The chosen port will be shown by LocalPort after the connection is established.

LocalPort cannot be changed once a connection is made. Any attempt to set this when a connection is active will generate an error.

This; setting is useful when trying to connect to services that require a trusted port in the client side. An example is the remote shell (rsh) service in UNIX systems.

MaxPacketSize:   The maximum length of the packets that can be received.

This setting specifies the maximum size of the datagrams that the component will accept without truncation.

QOSDSCPValue:   Used to specify an arbitrary QOS/DSCP setting (optional).

UseConnection must be True to use this setting. This option allows you to specify an arbitrary DSCP value between 0 and 63. The default is 0. When set to the default value the component will not set a DSCP value.

Note: This setting uses the qWAVE API is only available on Windows 7, Windows Server 2008 R2, and later.

QOSTrafficType:   Used to specify QOS/DSCP settings (optional).

UseConnection must be True to use this setting. You may specify either the text or integer values: BestEffort (0), Background (1), ExcellentEffort (2), AudioVideo (3), Voice (4), and Control (5).

Note: This setting uses the qWAVE API which is only available on Windows Vista and Windows Server 2008 or above.

Note: QOSTrafficType must be set before setting Active to true.

ShareLocalPort:   If set to True, allows more than one instance of the component to be active on the same local port.

This option must be set before the component is activated through the Active property or it will have no effect.

The default value for this setting is False.

UseConnection:   Determines whether to use a connected socket.

UseConnection specifies whether the component should use a connected socket or not. The connection is defined as an association in between the local address/port and the remote address/port. As such, this is not a connection in the traditional TCP sense. What it means is only that the component will send and receive data only to and from the specified destination.

The default value for this setting is False.

UseIPv6:   Whether or not to use IPv6.

By default, the component expects an IPv4 address for local and remote host properties, and will create an IPv4 socket. To use IPv6 instead, set this to True.

Socket Configuration Settings

AbsoluteTimeout:   Determines whether timeouts are inactivity timeouts or absolute timeouts.

If AbsoluteTimeout is set to True, any method which does not complete within Timeout seconds will be aborted. By default, AbsoluteTimeout is False, and the timeout is an inactivity timeout.

Note: This option is not valid for UDP ports.

FirewallData:   Used to send extra data to the firewall.

When the firewall is a tunneling proxy, use this property to send custom (additional) headers to the firewall (e.g. headers for custom authentication schemes).

InBufferSize:   The size in bytes of the incoming queue of the socket.

This is the size of an internal queue in the TCP/IP stack. You can increase or decrease its size depending on the amount of data that you will be receiving. Increasing the value of the InBufferSize setting can provide significant improvements in performance in some cases.

Some TCP/IP implementations do not support variable buffer sizes. If that is the case, when the component is activated the InBufferSize reverts to its defined size. The same happens if you attempt to make it too large or too small.

OutBufferSize:   The size in bytes of the outgoing queue of the socket.

This is the size of an internal queue in the TCP/IP stack. You can increase or decrease its size depending on the amount of data that you will be sending. Increasing the value of the OutBufferSize setting can provide significant improvements in performance in some cases.

Some TCP/IP implementations do not support variable buffer sizes. If that is the case, when the component is activated the OutBufferSize reverts to its defined size. The same happens if you attempt to make it too large or too small.

Base Configuration Settings

BuildInfo:   Information about the product's build.

When queried, this setting will return a string containing information about the product's build.

GUIAvailable:   Tells the component whether or not a message loop is available for processing events.

In a GUI-based application, long-running blocking operations may cause the application to stop responding to input until the operation returns. The component will attempt to discover whether or not the application has a message loop and, if one is discovered, it will process events in that message loop during any such blocking operation.

In some non-GUI applications an invalid message loop may be discovered that will result in errant behavior. In these cases, setting GUIAvailable to false will ensure that the component does not attempt to process external events.

LicenseInfo:   Information about the current license.

When queried, this setting will return a string containing information about the license this instance of a component is using. It will return the following information:

  • Product: The product the license is for.
  • Product Key: The key the license was generated from.
  • License Source: Where the license was found (e.g. RuntimeLicense, License File).
  • License Type: The type of license installed (e.g. Royalty Free, Single Server).
UseDaemonThreads:   Whether threads created by the component are daemon threads.

If set to True (default), when the component creates a thread the thread's Daemon property will be explicitly set to True. When set to False the component will not set the Daemon property on the created thread. The default value is True.

UseInternalSecurityAPI:   Tells the component whether or not to use the system security libraries or an internal implementation.

By default the component will use the system security libraries to perform cryptographic functions. Setting this to True tells the component to use the internal implementation instead of using the system's security API.

Copyright (c) 2021 /n software inc. - All rights reserved.
IPWorks P2P 2020 Kotlin Edition - Version 20.0 [Build 7941]