GrpcStreamHandle
Este conteúdo não está disponível em sua língua ainda.
GrpcStreamHandle =
object
Defined in: src/io/broker/GrpcClientActor.ts:63
Write capability for a stream the caller drives.
Two fields, two jobs. streamId is the correlation id: it is what
this stream’s stream-data / stream-end / stream-error frames
carry, so one collector can multiplex several concurrent streams.
token is the capability: clientStreamSend / clientStreamClose
find the stream by token, never by id.
The split matters because a tell carries no verified sender. A
sequential id doubles as an address — knowing one hands you the next
— so an id alone would let anything that can reach the client actor
write into, or close, a stream it never opened. Sixty-four bits of
crypto.getRandomValues cannot be guessed, which makes the map
lookup itself the ownership check: a wrong token simply finds
nothing.
Properties
Section titled “Properties”streamId
Section titled “streamId”
readonlystreamId:number
Defined in: src/io/broker/GrpcClientActor.ts:64
readonlytoken:string
Defined in: src/io/broker/GrpcClientActor.ts:65
