unity matchinfo

C#
MatchInfo.matchInfo = networkManager.matchInfo;
networkManager.matchMaker.DropConnection(matchInfo.networkId, matchInfo.nodeId, 0, networkManager.OnDropConnection);
networkManager.StopHost();
Source

Also in C#: