A channel to a network socket.
A channel that implements this interface is a channel to a network socket. The {@link #bind(SocketAddress) bind} method is used to bind the socket to a local {@link SocketAddress address}, the {@link #getLocalAddress() getLocalAddress} method returns the address that the socket is bound to, and the {@link #setOption(SocketOption,Object) setOption} and {@link #getOption(SocketOption) getOption} methods are used to set and query socket options. An implementation of this interface should specify the socket options that it supports.
The {@link #bind bind} and {@link #setOption setOption} methods that do not otherwise have a value to return are specified to return the network channel upon which they are invoked. This allows method invocations to be chained. Implementations of this interface should specialize the return type so that method invocations on the implementation class can be chained.
- Implemented types
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isClosed → bool
-
Tells whether or not this channel is open.
no setterinherited
- localAddress → SocketAddress?
-
Returns the socket address that this channel's socket is bound to.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
bind(
SocketAddress local) → Future< NetworkChannel?> - Binds the channel's socket to a local address.
-
close(
) → Future< void> -
Closes this stream and releases any system resources associated
with it. If the stream is already closed then invoking this
method has no effect.
inherited
-
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