socket.disconnect()


一个将相连的 dgram.Socket 与远程地址断掉的同步函数。 在一个未绑定或已经断开连接的 socket 上尝试调用 disconnect() 会导致一个 ERR_SOCKET_DGRAM_NOT_CONNECTED 异常。

A synchronous function that disassociates a connected dgram.Socket from its remote address. Trying to call disconnect() on an unbound or already disconnected socket will result in an ERR_SOCKET_DGRAM_NOT_CONNECTED exception.