示例#1
0
 public void Send(Poly.Net.Tcp.Client Client)
 {
     if (Client != null)
     {
         Client.SendLine(this.Template(Format));
     }
 }
示例#2
0
        public bool Receive(Poly.Net.Tcp.Client Client)
        {
            string Data = Client.Receive();

            if (Data == null)
            {
                return(false);
            }

            foreach (var Pair in Formats)
            {
                if (Data.Match(Pair.Value, false, this) != null)
                {
                    this.Format = Pair.Value;
                    this.Action = Pair.Key;
                    return(true);
                }
            }

            this.Message = Data;
            return(false);
        }