valkyrie-docs/docs/api/valkyrie-js.channelconnection.md
2023-08-02 00:58:34 +12:00

39 lines
1.4 KiB
Markdown

<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index) &gt; [valkyrie-js](./valkyrie-js) &gt; [ChannelConnection](./valkyrie-js.channelconnection)
## ChannelConnection class
**Signature:**
```typescript
export declare abstract class Connection<
Channel extends AnyOf<Channels> = any,
> extends EventEmitter<Channel["events"]>
```
**Extends:** EventEmitter&lt;Channel\["events"\]&gt;
## Constructors
| Constructor | Modifiers | Description |
| --- | --- | --- |
| [(constructor)(stream, channel, name)](./valkyrie-js.channelconnection._constructor_) | | Constructs a new instance of the <code>Connection</code> class |
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [channel](./valkyrie-js.channelconnection.channel) | | string | |
| [id](./valkyrie-js.channelconnection.id) | <code>abstract</code> | string | |
| [inCount](./valkyrie-js.channelconnection.incount) | | number | |
| [name?](./valkyrie-js.channelconnection.name) | | string | _(Optional)_ |
| [outCount](./valkyrie-js.channelconnection.outcount) | | number | |
| [stream](./valkyrie-js.channelconnection.stream) | <code>protected</code> | [Stream](./valkyrie-js.stream) | |
## Methods
| Method | Modifiers | Description |
| --- | --- | --- |
| [dispose()](./valkyrie-js.channelconnection.dispose) | <code>abstract</code> | |
| [send(type, body)](./valkyrie-js.channelconnection.send) | | |