# cp.websocket.status

A `table` of statuses used by both `cp.websocket.serial` and `cp.websocket.http` to describe the connection status.

---

## API Overview
**Constants** - _Useful values which cannot be changed_
 * [closed](#closed)
 * [closing](#closing)
 * [open](#open)
 * [opening](#opening)

---

## API Documentation

#### Constants

### [closed](#closed)

|                                             |                                                                                     |
| --------------------------------------------|-------------------------------------------------------------------------------------|
| **Signature**                               | `cp.websocket.status.closed <string>`                                                                    |
| **Type**                                    | Constant                                                                     |
| **Description**                             | The socket is closed.                                                                     |
| **Notes**                                   | None |
| **Source**                                  | [src/extensions/cp/websocket/status.lua line 17](https://github.com/CommandPost/CommandPost/blob/develop/src/extensions/cp/websocket/status.lua#L17) |

---

### [closing](#closing)

|                                             |                                                                                     |
| --------------------------------------------|-------------------------------------------------------------------------------------|
| **Signature**                               | `cp.websocket.status.closing <string>`                                                                    |
| **Type**                                    | Constant                                                                     |
| **Description**                             | The socket is attempting to close.                                                                     |
| **Notes**                                   | None |
| **Source**                                  | [src/extensions/cp/websocket/status.lua line 13](https://github.com/CommandPost/CommandPost/blob/develop/src/extensions/cp/websocket/status.lua#L13) |

---

### [open](#open)

|                                             |                                                                                     |
| --------------------------------------------|-------------------------------------------------------------------------------------|
| **Signature**                               | `cp.websocket.status.open <string>`                                                                    |
| **Type**                                    | Constant                                                                     |
| **Description**                             | The socket is open.                                                                     |
| **Notes**                                   | None |
| **Source**                                  | [src/extensions/cp/websocket/status.lua line 9](https://github.com/CommandPost/CommandPost/blob/develop/src/extensions/cp/websocket/status.lua#L9) |

---

### [opening](#opening)

|                                             |                                                                                     |
| --------------------------------------------|-------------------------------------------------------------------------------------|
| **Signature**                               | `cp.websocket.status.opening <string>`                                                                    |
| **Type**                                    | Constant                                                                     |
| **Description**                             | The socket is attempting to open.                                                                     |
| **Notes**                                   | None |
| **Source**                                  | [src/extensions/cp/websocket/status.lua line 5](https://github.com/CommandPost/CommandPost/blob/develop/src/extensions/cp/websocket/status.lua#L5) |

---

---

<script src="https://giscus.app/client.js"
        data-repo="CommandPost/CommandPost"
        data-repo-id="MDEwOlJlcG9zaXRvcnk3NDY0NTk2NQ=="
        data-category="Website Discussion"
        data-category-id="DIC_kwDOBHMBzc4CXFFA"
        data-mapping="pathname"
        data-strict="0"
        data-reactions-enabled="1"
        data-emit-metadata="0"
        data-input-position="bottom"
        data-theme="dark"
        data-lang="en"
        crossorigin="anonymous"
        async>
</script>
