/// <summary> /// 发送udp数据 /// </summary> /// <param name="buff"></param> public void Send(byte[] buff) { #if !UNITY_EDITOR && UNITY_WSA upClient.SendUdpMessage(buff); #else udpSendSocket.SendToAsyncByUDP(buff); #endif }
/// <summary> /// 发送udp数据 /// </summary> /// <param name="buff"></param> public void Send(byte[] buff) { if (buff.Length > 65500) { print("buff > 65500 !!!"); return; } #if !UNITY_EDITOR && UNITY_WSA upClient.SendUdpMessage(buff); #else udpSendSocket.SendToAsyncByUDP(buff); #endif }
/// <summary> /// 发送udp数据 /// </summary> /// <param name="buff"></param> public void Send(byte[] buff) { udpSendSocket.SendToAsyncByUDP(buff); }