예제 #1
0
        public void DisconnectClient(uint clientId)
        {
            NetId netId = new NetId(clientId);

            if (netId.IsHost() || netId.IsInvalid())
            {
                return;
            }
            RelayTransport.Disconnect(netId.HostId, netId.ConnectionId, out byte error);
        }
예제 #2
0
        public void QueueMessageForSending(uint clientId, ref byte[] dataBuffer, int dataSize, int channelId, bool skipqueue, out byte error)
        {
            NetId netId = new NetId(clientId);

            if (netId.IsHost() || netId.IsInvalid())
            {
                error = 0;
                return;
            }
            if (skipqueue)
            {
                RelayTransport.Send(netId.HostId, netId.ConnectionId, channelId, dataBuffer, dataSize, out error);
            }
            else
            {
                RelayTransport.QueueMessageForSending(netId.HostId, netId.ConnectionId, channelId, dataBuffer, dataSize, out error);
            }
        }