---
title: "IO.SocketStream"
description: "Abstract IO socket stream prototype."
canonical_url: "https://www.zeyos.com/zymba/ref/io/io-socketstream"
markdown_url: "https://www.zeyos.com/ai/guide/zymba/ref/io/io-socketstream.md"
section: "zymba-reference"
authority: "reference"
language: "en"
source_repository: "https://cloud.zeyos.com/__doc/zymbaref.json"
source_sha256: "05a361c6ddc32e74f4a6dc16fd06f218210ff1b7ce57f26ca1994bfffc407915"
---

# IO.SocketStream

## IO.SocketStream

```
object @IO.SocketStream(@IO.Stream) {
	disableEncryption(): $this {}
	enableEncryption(): $this {}
	getLocalEndpoint(): string {}
	getRemoteEndpoint(): string {}
	peek(int $length): string {}
	receive(int $length): object {}
	receiveOutOfBand(int $length): object {}
	send(string $string, string $endpoint): int {}
	sendOutOfBand(string $string, string $endpoint): int {}
	shutdownReceive(): $this {}
	shutdownSend(): $this {}
}
```

**Abstract IO socket stream prototype.**

### Prototype

**[IO.Stream](#)**

## Methods


### `$this.disableEncryption()`


```code
$this.disableEncryption(): this
```

##### Returns

| Type | Value |
| --- | ---  |
| `$this` |  |




### `$this.enableEncryption()`


```code
$this.enableEncryption(): this
```

##### Returns

| Type | Value |
| --- | ---  |
| `$this` |  |




### `$this.getLocalEndpoint()`


```code
$this.getLocalEndpoint(): string
```

##### Returns

| Type | Value |
| --- | ---  |
| `string` |  |




### `$this.getRemoteEndpoint()`


```code
$this.getRemoteEndpoint(): string
```

##### Returns

| Type | Value |
| --- | ---  |
| `string` |  |




### `$this.peek()`


```code
$this.peek(int $length): string
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| length | `int`  |  | 0 |

##### Returns

| Type | Value |
| --- | ---  |
| `string` |  |




### `$this.receive()`


```code
$this.receive(int $length): object
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| length | `int`  |  | 0 |

##### Returns

| Type | Value |
| --- | ---  |
| `object` | [string, endpoint] |
| `null` |  |




### `$this.receiveOutOfBand()`


```code
$this.receiveOutOfBand(int $length): object
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| length | `int`  |  | 0 |

##### Returns

| Type | Value |
| --- | ---  |
| `object` | [string, endpoint] |
| `null` |  |




### `$this.send()`


```code
$this.send(string $string, string $endpoint): int
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| string | `string`  |  | "" |
| endpoint | `string`  |  | "" |

##### Returns

| Type | Value |
| --- | ---  |
| `int` |  |




### `$this.sendOutOfBand()`


```code
$this.sendOutOfBand(string $string, string $endpoint): int
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| string | `string`  |  | "" |
| endpoint | `string`  |  | "" |

##### Returns

| Type | Value |
| --- | ---  |
| `int` |  |




### `$this.shutdownReceive()`


```code
$this.shutdownReceive(): this
```

##### Returns

| Type | Value |
| --- | ---  |
| `$this` |  |




### `$this.shutdownSend()`


```code
$this.shutdownSend(): this
```

##### Returns

| Type | Value |
| --- | ---  |
| `$this` |  |
