Ejemplo n.º 1
0
 /// <summary>
 /// 构造函数。
 /// </summary>
 /// <param name="source"></param>
 /// <param name="messge"></param>
 public Answer(MSGKind source, string messge)
 {
     this.Kind = MSGKind.Answer;
     this.SourceKind = source;
     this.Message = messge;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 构造函数。
 /// </summary>
 /// <param name="source"></param>
 public Answer(MSGKind source)
     : this(source, string.Empty)
 {
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 发送应答数据给客户端。
 /// </summary>
 /// <param name="netWorkStream"></param>
 /// <param name="sendkind"></param>
 /// <param name="message"></param>
 protected virtual void SendAnswer(NetworkStream netWorkStream, MSGKind sendkind, string message)
 {
     Answer answer = new Answer(sendkind, message);
     answer.Time = DateTime.Now;
     this.SendData(netWorkStream, answer, message);
 }