Пример #1
0
 /// <summary>
 /// 接受到数据事件处理函数
 /// </summary>
 /// <param name="e"></param>
 private void SocketReceiveProcess(SocketReceiveEventArgs e)
 {
     if (OnSocketReceive != null)
     {
         OnSocketReceive(this, e);
     }
 }
Пример #2
0
 private static void client_OnSocketReceive(object sender, SocketReceiveEventArgs e)
 {
     foreach (string content in e.Contents)
     {
         Console.WriteLine(content);
     }
 }
Пример #3
0
 static void server_OnSocketReceive(object sender, SocketReceiveEventArgs e)
 {
     foreach (string content in e.Contents)
     {
         Console.WriteLine(content);
         e.DataSender.Send(content.Length.ToString());
     }
 }
Пример #4
0
 /// <summary>
 /// 接受到数据事件处理函数
 /// </summary>
 /// <param name="e"></param>
 private void SocketReceiveProcess(SocketReceiveEventArgs e)
 {
     if (OnSocketReceive != null)
     {
         OnSocketReceive(this, e);
     }
 }