Network class final
Pure, effectful networking operations for TCP and UDP communication.
Network provides a static API for creating client sockets, server
sockets, and datagram (UDP) sockets — all expressed as Resource or
Rill values that are referentially transparent and only execute when
interpreted.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- interfaces → NetworkInterfaces
-
Provides access to the network interfaces available on the host.
no setter
Static Methods
-
bind(
SocketAddress< Host> address) → Resource<ServerSocket> -
Binds a TCP server socket to
addressand returns a resource-managed ServerSocket. -
bindAndAccept(
SocketAddress< Host> address) → Rill<Socket> -
Binds a TCP server to
addressand emits each accepted client connection as a Socket. -
bindDatagramSocket(
SocketAddress< Host> address) → Resource<DatagramSocket> -
Binds a UDP socket to
addressand returns a resource-managed DatagramSocket. -
connect(
SocketAddress< Host> address) → Resource<Socket> -
Establishes a TCP connection to
addressand returns a resource-managed Socket.