Source: https://h2corn.monicz.dev/api/applications/

# ASGI applications and aliases

These aliases describe the callable boundary between an ASGI application and h2corn. [`Application`](https://h2corn.monicz.dev/api/applications/#h2corn.Application "Application module-attribute") accepts either the precise [`ASGIApp`](https://h2corn.monicz.dev/api/applications/#h2corn.ASGIApp "ASGIApp module-attribute") contract or the broader mutable-mapping annotations used by framework applications.

## ASGIApp`module-attribute`

```python
ASGIApp = Callable[[Scope, Receive, Send], Awaitable[None]]
```

## FrameworkASGIApp`module-attribute`

```python
FrameworkASGIApp = Callable[[MutableMapping[str, Any], FrameworkReceive, FrameworkSend], Awaitable[None]]
```

## Application`module-attribute`

```python
Application = ASGIApp | FrameworkASGIApp
```

## ApplicationFactory`module-attribute`

```python
ApplicationFactory = Callable[[], Application]
```

## Receive`module-attribute`

```python
Receive = Callable[[], Awaitable[ReceiveMessage]]
```

## Send`module-attribute`

```python
Send = Callable[[SendMessage], Awaitable[None]]
```

## Scope`module-attribute`

```python
Scope = HTTPScope | WebSocketScope | LifespanScope
```

## ReceiveMessage`module-attribute`

```python
ReceiveMessage = HTTPRequest | HTTPDisconnect | WebSocketConnect | WebSocketReceiveBytes | WebSocketReceiveText | WebSocketDisconnect | LifespanStartup | LifespanShutdown
```

## SendMessage`module-attribute`

```python
SendMessage = HTTPResponseStart | HTTPResponseBody | HTTPResponseTrailers | HTTPResponsePathsend | HTTPResponseZeroCopySend | HTTPResponseEarlyHint | WebSocketAccept | WebSocketSendBytes | WebSocketSendText | WebSocketClose | WebSocketHTTPResponseStart | WebSocketHTTPResponseBody | LifespanStartupComplete | LifespanStartupFailed | LifespanShutdownComplete | LifespanShutdownFailed
```

## Message`module-attribute`

```python
Message = ReceiveMessage | SendMessage
```
