---
title: subscriptions
sidebarTitle: subscriptions
---

# `prefect.server.utilities.subscriptions`

## Functions

### `accept_prefect_socket` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/utilities/subscriptions.py#L19" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python
accept_prefect_socket(websocket: WebSocket) -> Optional[WebSocket]
```

### `still_connected` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/utilities/subscriptions.py#L85" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python
still_connected(websocket: WebSocket) -> bool
```


Checks that a client websocket still seems to be connected during a period where
the server is expected to be sending messages.

