void SendDeclinedRequest(IPEndPoint iPEndPoint) { DeclinedPacket packet = new DeclinedPacket(); packet.payload.reason = "Max clients reached"; PacketManager.Instance.SendPacketToClient(packet, iPEndPoint); }
void OnDeclinedRequest(Stream stream, IPEndPoint iPEndPoint) { if (!NetworkManager.Instance.isServer) { state = State.Disconnected; clientSalt = serverSalt = -1; DeclinedPacket packet = new DeclinedPacket(); packet.Deserialize(stream); Debug.LogError(packet.payload.reason); } }