TcpTransport class

A TCP transport adapter.

Constructors

TcpTransport(TcpOptions options)
Creates a TCP transport adapter.

Properties

eventRouter Map<String, List<EventHandler>>
Router instance used to map incoming events to handlers.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
isOpen bool
The isOpen property contains the status of the adapter.
no setter
messagesResolver ↔ MessagesResolver?
Messages resolver instance for this transport. It will be initialized after the bootstrap phase.
getter/setter pairinherited
name String
Unique name identifying this adapter (e.g. 'inmemory', 'redis').
no setter
options TcpOptions
Define the transport options.
finalinherited
requestResponseRouter Map<String, MessageHandler>
Router instance used to map incoming packets to handlers.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
server TcpSocket?
The server property contains the server.
getter/setter pairinherited
status Stream<TcpEvents>
Stream of transport status events (e.g. connected, disconnected, error).
no setter

Methods

close() Future<void>
The close method is used to close the server.
emit(RpcContext context) Future<void>
Send a fire-and-forget event.
getResolver(ApplicationConfig config) → MessagesResolver
Get the messages resolver for this transport.
inherited
init(ApplicationConfig config) Future<void>
Initialize underlying driver resources.
listen() Future<void>
Listen to the incoming packets and route them to the appropriate handlers.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send(RpcContext context) Future<ResponsePacket>
Send an RPC style request and wait for a response (or timeout).
toString() String
A string representation of this object.
inherited

Operators

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