# zx::socket

## Summary

### Inheritance

Inherits from: [zx::object\< socket \>](https://fuchsia.dev/reference/cpp/class/zx/object)

| ### Constructors and Destructors ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/zx/socket#classzx_1_1socket_1a85210e7306d775e46f7a0e8afe7f86cd()` ||
| `https://fuchsia.dev/reference/cpp/class/zx/socket#classzx_1_1socket_1a1a5836fbacdd2bcbd5a6efa01da94c46(zx_handle_t value)` ||
| `https://fuchsia.dev/reference/cpp/class/zx/socket#classzx_1_1socket_1a9b667d4372c3937c438d4775a7fc73c1(https://fuchsia.dev/reference/cpp/class/zx/object#classzx_1_1object && h)` ||
| `https://fuchsia.dev/reference/cpp/class/zx/socket#classzx_1_1socket_1abd27af04073db8a7a15e9099e2e5f980(https://fuchsia.dev/reference/cpp/class/zx/socket#classzx_1_1socket && other)` ||

| ### Public static attributes ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/zx/socket#classzx_1_1socket_1a5aa423648fe150e9d3208f21b4cc0311 = ZX_OBJ_TYPE_SOCKET` | `constexpr zx_obj_type_t` |

| ### Public functions ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/zx/socket#classzx_1_1socket_1a963574ac690773a9d4d58130317c26dc(https://fuchsia.dev/reference/cpp/class/zx/socket#classzx_1_1socket && other)` | `https://fuchsia.dev/reference/cpp/class/zx/socket#classzx_1_1socket &` |
| `https://fuchsia.dev/reference/cpp/class/zx/socket#classzx_1_1socket_1ae3e5f07acac2ae9e80a74f4d3296a810(uint32_t options, void *buffer, size_t len, size_t *actual)` | `zx_status_t` |
| `https://fuchsia.dev/reference/cpp/class/zx/socket#classzx_1_1socket_1a6dad709cb8d7a5e065a7ac6fcf7f2737(uint32_t disposition, uint32_t disposition_peer)` | `zx_status_t` |
| `https://fuchsia.dev/reference/cpp/class/zx/socket#classzx_1_1socket_1a18f33820dd05dfc9657d50758ed493bf(uint32_t options, const void *buffer, size_t len, size_t *actual)` | `zx_status_t` |

| ### Public static functions ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/zx/socket#classzx_1_1socket_1a0c437c9e0118f32b4da07ce165b62b36(uint32_t options, https://fuchsia.dev/reference/cpp/class/zx/socket#classzx_1_1socket *endpoint0, https://fuchsia.dev/reference/cpp/class/zx/socket#classzx_1_1socket *endpoint1)` | `zx_status_t` |

## Public static attributes

### TYPE

```c++
constexpr zx_obj_type_t TYPE = ZX_OBJ_TYPE_SOCKET
```

## Public functions

### operator=

```c++
socket & operator=(
  socket && other
)
```

### read

```c++
zx_status_t read(
  uint32_t options,
  void *buffer,
  size_t len,
  size_t *actual
)
```

### set_disposition

```c++
zx_status_t set_disposition(
  uint32_t disposition,
  uint32_t disposition_peer
)
```

### socket

```c++
constexpr socket()=default
```

### socket

```c++
 socket(
  zx_handle_t value
)
```

### socket

```c++
 socket(
  handle && h
)
```

### socket

```c++
 socket(
  socket && other
)
```

### write

```c++
zx_status_t write(
  uint32_t options,
  const void *buffer,
  size_t len,
  size_t *actual
)
```

## Public static functions

### create

```c++
zx_status_t create(
  uint32_t options,
  socket *endpoint0,
  socket *endpoint1
)
```