summaryrefslogtreecommitdiffstats
path: root/src/network/socket/qnativesocketengine_winrt_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/socket/qnativesocketengine_winrt_p.h')
-rw-r--r--src/network/socket/qnativesocketengine_winrt_p.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/network/socket/qnativesocketengine_winrt_p.h b/src/network/socket/qnativesocketengine_winrt_p.h
index c1fbcf70fa..654bb99d35 100644
--- a/src/network/socket/qnativesocketengine_winrt_p.h
+++ b/src/network/socket/qnativesocketengine_winrt_p.h
@@ -200,10 +200,18 @@ private:
Microsoft::WRL::ComPtr<ABI::Windows::Networking::Sockets::IStreamSocketListener> tcpListener;
Microsoft::WRL::ComPtr<ABI::Windows::Foundation::IAsyncAction> connectOp;
Microsoft::WRL::ComPtr<ABI::Windows::Foundation::IAsyncOperationWithProgress<ABI::Windows::Storage::Streams::IBuffer *, UINT32>> readOp;
+
+ // Protected by readMutex. Written in handleReadyRead (native callback)
QBuffer readBytes;
- QMutex readMutex;
+ // In case of TCP readMutex protects readBytes and bytesAvailable. In case of UDP it is
+ // pendingDatagrams. They are written inside native callbacks (handleReadyRead and
+ // handleNewDatagrams/putIntoPendingDatagramsList)
+ mutable QMutex readMutex;
+
+ // Protected by readMutex. Written in handleNewDatagrams/putIntoPendingDatagramsList
QList<WinRtDatagram> pendingDatagrams;
+
QList<ABI::Windows::Networking::Sockets::IStreamSocket *> pendingConnections;
QList<ABI::Windows::Networking::Sockets::IStreamSocket *> currentConnections;
QEventLoop eventLoop;