XHRTransport class
- Inheritance
-
- Object
- EventEmitter
- Transport
- PollingTransport
- XHRTransport
Constructors
- XHRTransport(Map opts)
- XHR Polling constructor.
Properties
- agent ↔ bool?
-
getter/setter pairinherited
- enablesXDR ↔ bool?
-
getter/setter pairinherited
-
extraHeaders
↔ Map<
String, dynamic> -
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hostname ↔ String
-
getter/setter pairinherited
- name ↔ String?
-
Transport name.
getter/setter pairinherited
- outOfBandDetection ↔ bool
-
getter/setter pairinherited
- path ↔ dynamic
-
getter/setter pairinherited
- polling ↔ bool?
-
getter/setter pairinherited
- pollXhr ↔ Request?
-
getter/setter pair
- port ↔ int?
-
getter/setter pairinherited
- query ↔ Map?
-
getter/setter pairinherited
- readyState ↔ String?
-
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secure ↔ bool
-
getter/setter pairinherited
- sendXhr ↔ Request?
-
getter/setter pair
- socket ↔ Socket?
-
getter/setter pairinherited
- supportsBinary ↔ bool?
-
XHR supports binary
getter/setter pairoverride
- timestampParam ↔ String?
-
getter/setter pairinherited
- timestampRequests ↔ bool?
-
getter/setter pairinherited
- writable ↔ bool?
-
getter/setter pairinherited
- xd ↔ bool
-
getter/setter pair
- xs ↔ bool
-
getter/setter pair
Methods
-
clearListeners(
) → void -
This function unbinds all the handlers for all the events.
inherited
-
close(
) → void -
Closes the transport.
inherited
-
decodePayload(
dynamic data, {bool binaryType = false, dynamic callback(dynamic err, [dynamic foo, dynamic bar]) = defaultCallback}) → dynamic -
Removes out of band data and decodes the clean payload.
inherited
-
doClose(
) → void -
For polling, send a close packet.
inherited
-
doOpen(
) → void -
Opens the socket (triggers polling). We write a PING message to determine
when the transport is open.
inherited
-
doPoll(
) → void -
Starts a poll cycle.
override
-
doWrite(
dynamic data, dynamic fn) → void -
Sends data.
override
-
emit(
String event, [dynamic data]) → void -
This function triggers all the handlers currently listening
to
eventand passes themdata.inherited -
hasListeners(
String event) → bool -
Returns whether the event has registered.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
off(
String event, [EventHandler? handler]) → void -
This function attempts to unbind the
handlerfrom theeventinherited -
on(
String event, EventHandler handler) → void -
This function binds the
handleras a listener to theeventinherited -
once(
String event, EventHandler handler) → void -
This function binds the
handleras a listener to the first occurrence of theevent. Whenhandleris called once, it is removed.inherited -
onClose(
) → void -
Called upon close.
inherited
-
onData(
dynamic data) → void -
Overloads onData to detect payloads.
inherited
-
onError(
dynamic msg, [dynamic desc]) → void -
Emits an error.
inherited
-
onOpen(
) → void -
Called upon open
inherited
-
onPacket(
dynamic packet) → void -
Called with a decoded packet.
inherited
-
open(
) → void -
Opens the transport.
inherited
-
outOfBand(
dynamic data) → void -
Called with out of band data.
inherited
-
pause(
dynamic onPause) → void -
Pauses polling.
inherited
-
poll(
) → void -
Starts polling cycle.
inherited
-
request(
[Map? opts]) → Request - Creates a request.
-
send(
List packets) → void -
Sends multiple packets.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
uri(
) → String -
Generates uri for connection.
inherited
-
write(
List packets) → void -
Writes a packets payload.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited