RawApiClient class
A simple socket-based API client to connect to a port on a host server.
Properties
-
hasConnected
→ bool
-
True if the client has established a connection with the server.
no setter
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
host
→ String
-
Host to connect to.
final
-
idWidth
→ int
-
The number of bytes to reserve for the endpoint id.
final
-
onConnect
→ void Function(Socket socket)?
-
A callback passing the server Socket when a connection is first
established.
final
-
onDisconnect
→ void Function(Socket socket)?
-
A callback passing the server Socket when the client disconnects
from the server.
final
-
onReceive
→ void Function(Socket socket, Uint8List data)?
-
A callback passing the server Socket and any sent data as a Uint8List
coming from the server.
final
-
port
→ int
-
Port to connect to.
final
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited