rename ptr
This commit is contained in:
parent
75011d0b4e
commit
a69408fa25
@ -47,7 +47,7 @@ namespace ix
|
||||
const WebSocketOpenInfo& openInfo,
|
||||
const WebSocketCloseInfo& closeInfo)
|
||||
{
|
||||
MessageDataPtr message(new Message());
|
||||
MessagePtr message(new Message());
|
||||
|
||||
message->type = type;
|
||||
message->str = str;
|
||||
@ -69,9 +69,9 @@ namespace ix
|
||||
_onMessageUserCallback = callback;
|
||||
}
|
||||
|
||||
WebSocketMessageQueue::MessageDataPtr WebSocketMessageQueue::popMessage()
|
||||
WebSocketMessageQueue::MessagePtr WebSocketMessageQueue::popMessage()
|
||||
{
|
||||
MessageDataPtr message;
|
||||
MessagePtr message;
|
||||
std::lock_guard<std::mutex> lock(_messagesMutex);
|
||||
|
||||
if (!_messages.empty())
|
||||
@ -88,7 +88,7 @@ namespace ix
|
||||
if (!_onMessageUserCallback)
|
||||
return;
|
||||
|
||||
MessageDataPtr message;
|
||||
MessagePtr message;
|
||||
|
||||
while (count > 0 && (message = popMessage()))
|
||||
{
|
||||
|
@ -39,14 +39,14 @@ namespace ix
|
||||
WebSocketCloseInfo closeInfo;
|
||||
};
|
||||
|
||||
using MessageDataPtr = std::shared_ptr<Message>;
|
||||
using MessagePtr = std::shared_ptr<Message>;
|
||||
|
||||
MessageDataPtr popMessage();
|
||||
MessagePtr popMessage();
|
||||
|
||||
private:
|
||||
WebSocket* _websocket = nullptr;
|
||||
OnMessageCallback _onMessageUserCallback;
|
||||
std::mutex _messagesMutex;
|
||||
std::list<MessageDataPtr> _messages;
|
||||
std::list<MessagePtr> _messages;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user