Exemplo n.º 1
0
        internal void Send(NetBuffer msg, RPCMode mode, NetConnection originalSender = null)
        {
            var message = PNetServer.peer.CreateMessage();
            msg.Clone(message);

            SendMessage(message, mode, originalSender);
        }
Exemplo n.º 2
0
        //fields are basically treated like OthersBuffered
        internal void SendField(NetBuffer msg, NetConnection originalSender = null)
        {
            var message = PNetServer.peer.CreateMessage();
            msg.Clone(message);

            var conns = _connections.Where(c => c != originalSender).ToList();
            if (conns.Count != 0)
                PNetServer.peer.SendMessage(message, conns, NetDeliveryMethod.ReliableOrdered, Channels.SYNCHED_FIELD);
            else
                PNetServer.peer.Recycle(message);
        }
Exemplo n.º 3
0
 //don't need to keep track of the mode, because the clients don't care about it, 
 //and technically, neither do we (everyone new needs it anyway, so 'all' and 'other' are identical)
 internal void Buffer(NetBuffer msg)
 {
     var toBuffer = new NetBuffer();
     msg.Clone(toBuffer);
     buffer.Add(toBuffer);
 }