TcpConnection class

Native TCP byte stream with explicit connection and shutdown ownership.

Constructors

TcpConnection(Socket socket)

Properties

bytes → Stream<Uint8List>
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
socket → Socket
final

Methods

close() → Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send(List<int> bytes) → Future<void>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

connect(String host, int port, {CancellationToken? cancellationToken, Duration timeout = const Duration(seconds: 15)}) → Future<TcpConnection>