我目前正在构建一个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是什么类型的?我应该在代码中添加哪个库/标题?