コード例 #1
0
    /// <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
    }
コード例 #2
0
    /// <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
    }
コード例 #3
0
 /// <summary>
 /// 发送udp数据
 /// </summary>
 /// <param name="buff"></param>
 public void Send(byte[] buff)
 {
     udpSendSocket.SendToAsyncByUDP(buff);
 }