Peer class
Inheritance
Object
StreamEventEmitter
Peer
Methods
call (String peer , MediaStream stream , {CallOption ? options })
→ MediaConnection
close ()
→ void
Closes the event emitter, which closes all the listeners in the process.
inherited
connect (String peer , {PeerConnectOption ? options })
→ DataConnection
disconnect ()
→ void
Disconnects the Peer's connection to the PeerServer. Does not close any
active connections.
Warning: The peer can no longer create or accept connections after being
disconnected. It also cannot reconnect to the server.
dispose ()
→ void
emit <T > (String type , T data )
→ void
Emit a event with a specific event type and data type .
This will broadcast the message to all listeners that match the same event type and data type .
inherited
emitError (PeerErrorType type , dynamic err )
→ void
emitEvent <T > (Event<T > event )
→ void
Emit a message on a specific event type and data type .
This will broadcast the event to all listeners that match the same event type and data type .
inherited
getConnection (String peerId , String connectionId )
→ dynamic
Retrieve a data/media connection for this peer. */
getMessages (String connectionId )
→ List <ServerMessage >
Stores messages without a set up connection, to be claimed later. */
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
on <T > ([String ? type ])
→ Stream <T >
Attach a listener to the event emitter.
Calls the callback
whenever there's a new event of the specified type and data type .
inherited
onAny <MessageType > ()
→ Stream <Event<MessageType > >
inherited
once <T > ([String ? type ])
→ Future <T >
Same as on but only running once, by returning a Future.
inherited
onceEvent <T extends Event > ([String ? type ])
→ Future <T >
Same as onEvent but only running once, by returning a Future.
inherited
onEvent <T extends Event > ([String ? type ])
→ Stream <T >
Attach a listener to an emitter. Calls the callback
whenever there's a new event of the specified type and data type .
inherited
reconnect ()
→ void
Attempts to reconnect with the same ID. */
removeConnection (dynamic connection )
→ void
connection: DataConnection / MediaConnection
toString ()
→ String
A string representation of this object.
inherited