# Client configuration (/en/realtime-media/rtm/build/connect-and-authenticate/client-configuration/windows)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

Client configuration enables you to customize the behavior of your Signaling client instance according to your app's requirements.

    ## Understand the tech [#understand-the-tech-6]

    When initializing a Signaling client instance, configure any or all of the following features:

    * **Geographical area access**
      When a user joins a channel, Signaling SDK automatically connects them to the closest geographical region of Agora SDRTN®. However, to comply with local laws and regulations, you may want to specify or restrict connections to a specific geographical area. Agora enables you to control and customize data routing in your app by specifying the Agora SDRTN® region users connect to.

    * **Private deployment**
      Private deployment enables you to deploy and manage the Signaling environment on your own infrastructure rather than using Agora services. This feature is fully supported since version 2.2.0.

    * **Logging**
      Logging enables you to output detailed information from the SDK for locating and fixing problems during the development and testing phases. By configuring logging settings, you can control the amount and type of information logged by the SDK.

    * **Data encryption**
      Enabling encryption ensures that only authorized users are able to read messages sent through Signaling. Signaling provides built-in encryption methods that guarantee data confidentiality during transmission. For implementation details, see [Data encryption](../secure-your-app-and-data/data-encryption).

    ## Prerequisites [#prerequisites-6]

    Ensure that you have integrated the Signaling SDK in your project and implemented the framework functionality from the [SDK quickstart](../../index) page.

    ## Configure the client instance [#configure-the-client-instance-6]

    This section explains how to set up and customize various features when you initialize a Signaling client instance.

    ### Geographical area configuration [#geographical-area-configuration-4]

    To specify a geographical area for Agora SDRTN® connections, refer to the following code:

    ```cpp
    rtmConfig.areaCode = RTM_AREA_CODE_NA;
    int ret = signalingEngine->initialize(rtmConfig);
    ```

    ### Private deployment configuration [#private-deployment-configuration-3]

    Agora is committed to offering its customers flexible, secure, and customizable solutions. Since version `2.2.0`, Signaling supports private deployments. This feature enables you to deploy and manage the Signaling environment yourself, giving you more control over your data and systems.

    Signaling provides `MESSAGE` and `STREAM` services. Choose one or both services based on your needs and budget. The following code shows you how to configure a private environment that deploys both services simultaneously:

    ```cpp
    std::vector<const char*> hosts;
    hosts.push_back("xxx");

    RtmConfig config;
    config.appId = "your_appid";
    config.userId = "your_name";
    config.privateConfig.serviceType = RTM_SERVICE_TYPE_MESSAGE | RTM_SERVICE_TYPE_STREAM;
    config.privateConfig.accessPointHosts = hosts.data();
    config.privateConfig.accessPointHostsCount = hosts.size();
    ```

    <CalloutContainer type="info">
      <CalloutTitle>
        Info
      </CalloutTitle>

      <CalloutDescription>
        To deploy a private environment, you need to set up the backend service. For assistance, please contact [technical support](mailto\:support@agora.io).
      </CalloutDescription>
    </CalloutContainer>

    ### Connection protocol [#connection-protocol-3]

    To ensure connection stability and continuous service availability, the RTM client establishes two transmission links for each service (`MESSAGE` service and `STREAM` service) when connecting to the edge server. By default, these links use the TCP and UDP protocols, respectively. This design ensures that network issues on one link do not affect the overall transmission. Compared to other WebSocket-based message transmission solutions, RTM's redundant link design maximizes transmission stability and message delivery rate.

    In some cases, users may find that their network does not support UDP port transmission, either temporarily or permanently. To ensure the dual-link design operates effectively, the SDK allows users to configure both links to use the TCP protocol. This can be done by setting the `protocolType` field in the `RtmConfig`. Below is a code example that configures both links to use the TCP protocol:

    ```cpp
    RtmConfig config;
    config.appId = "appid";
    config.userId = "userId";
    config.protocolType = RTM_PROTOCOL_TYPE_TCP_ONLY;
    ```

    <CalloutContainer type="info">
      <CalloutTitle>
        Info
      </CalloutTitle>

      <CalloutDescription>
        The SDK does not support configuring both links to use the UDP protocol simultaneously.
      </CalloutDescription>
    </CalloutContainer>

    ### Log configuration [#log-configuration-4]

    In the development and testing phase of your app, you may need to output more detailed information to locate and fix problems. Enable log output of the SDK and set the log information level by configuring `RTM_LOG_LEVEL` when initializing the Signaling client instance.

    ```cpp
    RtmConfig config;
    config.appId = "your_appid";
    config.userId = "your_name";
    config.eventHandler = new RtmEventHandler();

    config.logConfig.level = RTM_LOG_LEVEL_INFO;
    config.logConfig.filePath = "your_path";
    config.logConfig.fileSizeInKB = 10 * 1024;

    int errorCode = 0;
    IRtmClient* rtmClient = createAgoraRtmClient(config, errorCode);
    if (!rtmClient || errorCode != 0) {
      // create rtm client failed
    }
    ```

    Choose the log level from the following:

    | Enumeration value | Description                                                                                                                 |
    | ----------------- | --------------------------------------------------------------------------------------------------------------------------- |
    | `NONE`            | `0x0000`: Do not output any logs.                                                                                           |
    | `INFO`            | `0x0001`: Output logs of levels `FATAL`, `ERROR`, `WARN`, and `INFO`. Best practice is to set the log level to this option. |
    | `WARN`            | `0x0002`: Only output logs of levels `FATAL`, `ERROR`, and `WARN`.                                                          |
    | `ERROR`           | `0x0004`: Only output logs of levels `FATAL` and `ERROR`.                                                                   |
    | `FATAL`           | `0x0008`: Only output logs of levels `FATAL`.                                                                               |

    <CalloutContainer type="info">
      <CalloutDescription>
        When your app is released to production, set the log level to `INFO`.
      </CalloutDescription>
    </CalloutContainer>

    ## Reference [#reference-6]

    This section contains content that completes the information on this page, or points you to documentation that explains other aspects to this product.

    For firewall configuration, see [firewall requirements](../../reference/firewall)

    
  
      
  
      
  
