A message-passing port that is directly connected to another end.
Direct connection means, that both tx and rx exist in the same worker thread, so there is no need for any serialization - we simply pass the data.
tx
rx
Readonly
Optional thread id.
Destroy the communication channel.
Attach event listener for particular event.
Returns a function that can be called to unsubscribe.
Attach one-time event listener for particular event.
Attach a callback to be triggered when the port is being closed (via error or not).
Post a message to the port that should be received on the other end.
Static
Create a pair of symmetrical inter-connected ports.
A message-passing port that is directly connected to another end.
Direct connection means, that both
txandrxexist in the same worker thread, so there is no need for any serialization - we simply pass the data.