Skip to main content
readonly stub: TStub
The typed RPC proxy. agent.stub.method(...args) sends a call frame and resolves with the agent method’s return value, or rejects with the server’s error (e.g. method_not_found, or method_error when the method threw). A call made while no connection is ready waits in a buffer. The client sends it once a connection is ready. When the link drops, or a connection attempt fails, every call still waiting for an answer rejects. That includes the buffered calls. The client does not resend a rejected call.