Example #1
0
 public InboundMessage(OutboundMessage m)
 {
     Msg          = m.Msg;
     Msg.Position = 8; // skip the first byte, cos that's the type
     Type         = m.Type;
     Connection   = null;
 }
Example #2
0
        public void SendToAllExcept(OutboundMessage message, Connection exclude)
        {
            var recipients = server.Connections.Where(con => con != exclude.Remote).ToList();

            if (recipients.Count != 0)
            {
                server.SendMessage(message.Msg, recipients, DeliveryMethod(message), 0);
            }
        }
Example #3
0
        }                                                                                         // don't interpolate strings
#elif SERVER
        public override void WriteTo(OutboundMessage m)
        {
            m.Write(val);
        }
Example #4
0
 public abstract void WriteTo(OutboundMessage m);
Example #5
0
 protected NetDeliveryMethod DeliveryMethod(OutboundMessage msg)
 {
     return((NetDeliveryMethod)msg.Reliability);
 }
Example #6
0
 public void Send(OutboundMessage message)
 {
     client.SendMessage(message.Msg, DeliveryMethod(message));
 }
Example #7
0
 public void SendToAll(OutboundMessage message)
 {
     server.SendToAll(message.Msg, DeliveryMethod(message));
 }
Example #8
0
 public void Send(OutboundMessage message, Connection recipient)
 {
     server.SendMessage(message.Msg, recipient.Remote, DeliveryMethod(message));
 }