You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return pplx::task_from_exception<void>(websocket_exception(_XPLATSTR("Message size too large. Ensure message length is less than or equal to UINT_MAX.")));
235
+
return pplx::task_from_exception<void>(websocket_exception(_XPLATSTR("Message size too large. Ensure message length is less than UINT_MAX.")));
236
236
}
237
237
238
238
{
@@ -257,6 +257,47 @@ class winrt_client : public _websocket_client_impl, public std::enable_shared_fr
257
257
auto& is_buf = msg._m_impl->streambuf();
258
258
auto length = msg._m_impl->length();
259
259
260
+
if (length == SIZE_MAX)
261
+
{
262
+
// This indicates we should determine the length automatically.
263
+
if (is_buf.has_size())
264
+
{
265
+
// The user's stream knows how large it is -- there's no need to buffer.
266
+
auto buf_sz = is_buf.size();
267
+
if (buf_sz >= SIZE_MAX)
268
+
{
269
+
websocket_exception wx(_XPLATSTR("Cannot send messages larger than SIZE_MAX."));
0 commit comments