projects
/
sdk
/
tools
/
netcoredbg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
73fb919
)
Enable ReadFile to block when reading from socket
author
Igor Kulaychuk
<i.kulaychuk@samsung.com>
Thu, 23 Aug 2018 18:05:40 +0000
(21:05 +0300)
committer
Igor Kulaychuk
<i.kulaychuk@samsung.com>
Fri, 24 Aug 2018 15:36:22 +0000
(18:36 +0300)
src/debug/netcoredbg/platform.cpp
patch
|
blob
|
history
diff --git
a/src/debug/netcoredbg/platform.cpp
b/src/debug/netcoredbg/platform.cpp
index
3a940a6
..
90e0916
100644
(file)
--- a/
src/debug/netcoredbg/platform.cpp
+++ b/
src/debug/netcoredbg/platform.cpp
@@
-392,7
+392,10
@@
SOCKET IORedirectServerHandles::WaitForConnection(uint16_t port)
return INVALID_SOCKET;
}
- m_sockFd = ::socket(AF_INET, SOCK_STREAM, 0);
+ // Use WSASocket with 0 flags to create a socket without FILE_FLAG_OVERLAPPED.
+ // This enables the ReadFile function to block on reading from accepted socket.
+ DWORD dwFlags = 0;
+ m_sockFd = WSASocket(AF_INET, SOCK_STREAM, 0, NULL, 0, dwFlags);
if (m_sockFd == INVALID_SOCKET)
{
WSACleanup();