port.close()
禁止在连接的任一端进一步发送消息。当此 MessagePort
上不会发生进一步的通信时,可以调用此方法。
¥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
.
'close'
事件 在作为通道一部分的两个 MessagePort
实例上触发。
¥The 'close'
event is emitted on both MessagePort
instances that
are part of the channel.