コード例 #1
0
ファイル: test-send++.cpp プロジェクト: dazer-chen/PFQ
void mode_1(pfq::socket &q, int64_t num)
{
    for(int64_t n = 0; n < num;)
    {
        if (q.send(pfq::const_buffer(reinterpret_cast<const char *>(ping), sizeof(ping))))
            n++;
    }
}
コード例 #2
0
ファイル: test-send++.cpp プロジェクト: pfq/PFQ
void send_packets(pfq::socket &q, int64_t num)
{
    std::cout << "sending " << num << " packets:" << std::endl;

    for(int64_t n = 0; n < num;)
    {
        if (q.send(pfq::const_buffer(reinterpret_cast<const char *>(ping), sizeof(ping))))
            n++;
    }
}