问题
With Socket class, I can use Socket.ReceiveAsync method passing SocketFlags.Peek flag. I don't see anything similar for StreamSocket, however.
UWP's InputStreamOptions enum provides Partial and ReadAhead flags but from their description it does not seem they are for the same purpose (checking data availability leaving the data in the input buffer).
来源:https://stackoverflow.com/questions/41165901/how-to-peek-streamsocket-for-data-in-uwp-apps