Exemplo n.º 1
0
 /// <summary>发送消息</summary>
 public void SendMsg(SessionTcp session, byte[] bytes)
 {
     if (session != null)
     {
         try
         {
             session.SendMsg(SocketTools.PackageLengthInfo(bytes));
         }
         catch (Exception e)
         {
             Debug.LogError(e);
         }
     }
 }
Exemplo n.º 2
0
 /// <summary>发送消息</summary>
 public void SendMsg(SessionTcp session, SocketMsg msg)
 {
     if (session != null)
     {
         try
         {
             byte[] bytes = SocketTools.PackageNetMsg(msg);
             session.SendMsg(bytes);
         }
         catch (Exception e)
         {
             Debug.LogError(e);
         }
     }
 }