Network.CloseConnection

切换到手册
public static void CloseConnection (NetworkPlayer target, bool sendDisconnectionNotification);

描述

关闭与另一个系统的连接。

target 定义了要关闭的位于连接对侧的系统。如果是客户端,唯一可能的连接是 服务器连接,如果是服务器,目标玩家将被强制下线。 sendDisconnectionNotification 启用或禁用向对方发送通知。如果禁用,连接直接关闭,否则,将向对方可靠发送断开连接通知,然后再关闭连接。

no example available in C#