---
schema_version: "1"
id: c9d6d47d87bf86961cd77174a26838b06550daa0e80ff4a93b7aca80db461b3b
title: WebSockets Studio Configuration
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/websockets-connector/latest/websockets-connector-studio.md
canonical_url: https://docs.mulesoft.com/websockets-connector/latest/websockets-connector-studio
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 26875517b2b0bdd8cffc757d8993edef947498e99dd15cf7c3bdc3c037a8def7
description: MuleSoft Documentation Site
release: "1.0"
latest: true
---
---
product: WebSockets Connector
version: 1.0
is-latest-version: true
---

# WebSockets Studio Configuration

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

To configure the connector in Anypoint Studio:

1.  Add the connector to a Studio project.

2.  Configure the connector.

3.  Configure an input source for the connector.

## Add the Connector to a Studio Project

Anypoint Studio provides two ways to add the connector to your Studio project: from the Exchange
button in the Studio taskbar or from the Mule Palette view.

### Add the Connector Using Exchange

1.  In Studio, create a Mule project.

2.  Click the Exchange icon **(X)** in the upper-left of the Studio task bar.

3.  In Exchange, click **Login** and supply your Anypoint Platform username and password.

4.  In Exchange, search for "websockets".

5.  Select the connector and click **Add to project**.

6.  Follow the prompts to install the connector.

### Add the Connector in Studio

1.  In Studio, create a Mule project.

2.  In the Mule Palette view, click **(X) Search in Exchange**.

3.  In **Add Modules to Project**, type "websockets" in the search field.

4.  Click this connector’s name in **Available modules**.

5.  Click **Add**.

6.  Click **Finish**.

## Configure the Connector

1.  Go to the **Global Elements** tab, and click **Create**.

2.  From **Connector Configuration**, select the **WebSockets Config**.

3.  If you want your connector to listen for incoming requests check the **Configure Inbound
    WebSocket** section.  
    If you want to perform requests to external services, check the **Configure Outbound WebSocket**
    section.  
    You can check both if your application will be doing both inbound and outbound connections.

### Configure Inbound WebSockets

1.  Go to the **Global Elements** tab and click **Create**.

2.  From **Connector Configuration**, select the **HTTP Listener Config**.

3.  In your WebSockets Configuration, check the **Server settings** box.

4.  Specify the listener base path(optional) and reference the HTTP Listener Config you created
    before.

### Configure Outbound WebSockets

1.  In your WebSockets Configuration, check the **Client settings** box.

2.  Specify the following optional properties:

    - Host

    - Port

    - Path

3.  In the **Default Headers** and **Query Parameters** sections you can introduce your default
    values for headers and query parameters by selecting an option from the drop-down list.

    1.  Select **Expression** to enter a `dwl` expression.

    2.  Click **Edit Inline** to enter key/value pairs by clicking the '+' sign.

## Configure an Input Source

Configure an input source for the connector.

You can put the following operations for the connector in the **Source** area of the Studio canvas:

- Inbound Listener

- On Outbound Socket Message

- On Inbound Connection (requires an Inbound Listener)

- On Socket Closed

## Next

Now that you have completed configuring Studio, see the
[Connector Configuration](https://docs.mulesoft.com/websockets-connector/latest/websockets-connector-config-topics) for more configuration ideas.

## See Also

- [Salesforce Help](https://help.salesforce.com)

- [WebSockets Connector Overview](https://docs.mulesoft.com/websockets-connector/latest/)

- [XML and Maven Configuration](https://docs.mulesoft.com/websockets-connector/latest/websockets-connector-xml-maven)
