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