public static bool Disconnect (int hostId, int connectionId, out byte error);

パラメーター

hostIdHost ID associated with this connection.
connectionIdThe connection ID of the connection you want to close.
errorError (can be cast to NetworkError for more information).

説明

Send a disconnect signal to the connected peer and close the connection. Poll NetworkTransport.Receive() to be notified that the connection is closed. This signal is only sent once (best effort delivery). If this packet is dropped for some reason, the peer closes the connection by timeout.