Skip to content

NodeWorker.MessagePort class

Represents one end of an asynchronous, two-way communications channel. It can be used to transfer structured data, memory regions, and other MessagePorts between different Workers.

C#
public class MessagePort

Public Members

namedescription
event Closed
event Message
event MessageError
Close()Disables further sending of messages on either side of the connection. This method can be called when no further communication will happen over this MessagePort. The Closed event is emitted on both MessagePort instances that are part of the channel.
PostMessage(…)
Ref()
Unref()Allows the thread to exit if this is the only active handle in the event system. If the worker is already unref()ed calling unref() again has no effect.
static CreateChannel()

See Also

Released under the MIT license