> For the complete documentation index, see [llms.txt](https://osl.mistium.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://osl.mistium.com/legacy-osl-originos/networking/websockets/.wsgetcount.md).

# wsGetcount

> ⚠️ **Not implemented in the current OSL CLI.**

## Description

wsGetcount allows you to get the number of messages on a websocket.

## Parameters

wsGetcount takes no parameters.

## Usage

```javascript
ws_id = "url".newWebsocket()

if ws_id.wsHasnew() (
  count = ws_id.wsGetcount()
  // find how many messages you recieved
  loop count (
    message = ws_id.wsGetnext()
    // handle the message
  )
)
```
