> For the complete documentation index, see [llms.txt](https://docs.emobiq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.emobiq.com/emobiq-client/006-actions-and-visual-logic/action-reference/cordova/device/socketsend.md).

# socketSend

## Description

Sends data to a socket.

## Input / Parameter

| Name  | Description                     | Input Type  | Default | Options | Required |
| ----- | ------------------------------- | ----------- | ------- | ------- | -------- |
| type  | The type of connection.         | String/Text | -       | -       | Yes      |
| name  | The name of the connection.     | String/Text | default | -       | No       |
| event | The event to listen for.        | String/Text | -       | -       | No       |
| data  | The data to send to the socket. | String/Text | -       | -       | No       |

## Output

N/A

## Callback

### callback

The function to be executed if data is sent to the socket successfully.

### errorCallback

The function to be executed if data is not sent to the socket successfully.

## Video

Coming Soon.

## Example

### Steps

1. First ensure that you have established a socket connection. See `socketConnect`.

   ![](/files/LDchAINqYkWQF3xb17G0)
2. Enter the details of data to be sent

   ![](/files/8BfvW9EAVihvGI3iVGwr)

### Result

You can specify a function to be called when successful, and another one to be called if it is unsuccessful. See `Callback`.

## Links


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.emobiq.com/emobiq-client/006-actions-and-visual-logic/action-reference/cordova/device/socketsend.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
