libwebsockets:哪个库属于Client所属的类型?

时间:2017-11-22 00:58:12

标签: c websocket client libwebsockets

我目前正在构建一个WebSocket服务器,我遇到了以下代码来处理碎片消息(来自libwebsockets):

case LWS_CALLBACK_RECEIVE:
{
    Client * const client = (Client *)user;
    const size_t remaining = libwebsockets_remaining_packet_payload(wsi);
    if (0 == remaining &&
        libwebsocket_is_final_fragment(wsi))
    {
        if (client->HasFragments())
        {
            client->AppendMessageFragment(in, len, 0);
            in = (void *)client->GetMessage();
            len = client->GetMessageLength();
        }

        client->ProcessMessage((char *)in, len, wsi);

        client->ResetMessage();
    }
    else
    {
        client->AppendMessageFragment(in, len, remaining);
    }
}
break;

我的问题是,Client是什么类型的?我应该在代码中添加哪个库/标题?

1 个答案:

答案 0 :(得分:0)

你在一个过时的项目分支中查看过时的自述文件。转到the active projectvisit the official page