Populate Error object either with errno or WSAGetLastError() in case of Windows.
We'll still need to fix Error::AsCString to call FormatMessage for Windows errors but at least with this CL we can report about socket errors on Windows with meaningful code and message like "unknown error".
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Looks ok. I'm wondering at what point we should break the Socket class up into a SocketWindows and SocketPosix variants. Seems like soon, the number of ifdefs keeps growing. Not suggesting you should do this now though, just thinking out loud.
source/Host/common/Socket.cpp | ||
---|---|---|
598 | Indentation is messed up here. | |
640 | Messed up here too. |
Indentation is messed up here.