object
should be in either of the following forms:
interface EventTypes {
'event-with-parameters': any[]
'event-with-example-handler': (...args: any[]) => void
}
The function to send over whatever transport is used.
The handle registry. This can be changed later.
The function to send over whatever transport is used.
The handle registry. This can be changed later.
Calls a handle and awaits the return value.
Handle to call
Arguments to pass through
A promise that will return when the call is completed. This will
throw an error with the message Channel closed
if the channel is closed
before a response is received.
Calls each of the listeners registered for a given event.
Return an array listing the events for which the emitter has registered listeners.
Returns an async generator. This supports only yield
ing values: ATM,
returned values and yield
ed arguments are not supported. You also must
manually deallocate the generator once you're done! Yes, manual memory
management. If you don't manually deallocate, the listeners on both ends
will remain allocated leading to memory leaks. To deallocate, call the
return
or throw
functions on the generator.
Return the number of listeners listening to a given event.
Return the listeners registered for a given event.
Add a listener for a given event.
Add a one-time listener for a given event.
Call this when a new message is recieved to process it.
Incoming message
Remove all listeners, or those of the specified event.
Remove the listeners of a given event.
Sends data to a particular handle. Because there is no await
for the
other side to process this, the send
function should be used for pushing
data only since multiple messages may be sent before the other side gets
around to processing them.
Address to send data to
Data to send
The address of the return field. This is used for full transactions, such as function calls
Generated using TypeDoc
A wrapper class for functions to perform remote procedure calls.