HubConnection class

Represents a connection to a SignalR Hub

Constructors

HubConnection(IConnection connection, Logger logger, IHubProtocol protocol)

Properties

keepAliveIntervalInMilliseconds ↔ int
Default interval at which to ping the server. [...]
read / write
serverTimeoutInMilliseconds ↔ int
The server timeout in milliseconds. [...]
read / write
state HubConnectionState
Indicates the state of the {@link HubConnection} to the server.
read-only
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

invoke(String methodName, { List<Object> args }) → Future<Object>
Invokes a hub method on the server using the specified name and arguments. [...]
off(String methodName, { MethodInvacationFunc method }) → void
Removes the specified handler for the specified hub method. [...]
on(String methodName, MethodInvacationFunc newMethod) → void
Registers a handler that will be invoked when the hub method with the specified method name is invoked. [...]
onclose(ClosedCallback callback) → void
Registers a handler that will be invoked when the connection is closed. [...]
send(String methodName, List<Object> args) → Future<void>
Invokes a hub method on the server using the specified name and arguments. Does not wait for a response from the receiver. [...]
start() → Future<void>
Starts the connection. [...]
stop() → Future<void>
Stops the connection. [...]
stream(String methodName, List<Object> args) → Stream<Object>
Invokes a streaming hub method on the server using the specified name and arguments. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

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