A UDP socket: acquiring reader in a scope opens and binds a
socket (one at a time; another acquisition waits for it to close);
writer writes through the open one. make(reader, writer)
builds one.
Attributes#
| Attribute | Type | Description |
|---|---|---|
reader | Effect[Reader, DatagramSocketError, Scope] | Opens and binds the socket for the life of the scope and gives
its |
writer | Effect[Writer, Never, Scope] | The |
Functions#
__init__#
__init__(reader, writer) -> None| Parameter | Type | Description |
|---|---|---|
reader | Effect[Reader, DatagramSocketError, Scope] | |
writer | Effect[Writer, Never, Scope] |
def __init__(
self,
reader: Effect[Reader, DatagramSocketError, Scope],
writer: Effect[Writer, Never, Scope],
) -> None:
require_effect(reader, "reader")
require_effect(writer, "writer")
self._reader = reader
self._writer = writer