Commit dae64e2d authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

winhttp: Introduce netconn_wait_overlapped_result() helper.

parent 61ad0b84
......@@ -51,6 +51,13 @@ static int sock_send(int fd, const void *msg, size_t len, WSAOVERLAPPED *ovr)
return -1;
}
BOOL netconn_wait_overlapped_result( struct netconn *conn, WSAOVERLAPPED *ovr, DWORD *len )
{
DWORD retflags;
return WSAGetOverlappedResult( conn->socket, ovr, len, TRUE, &retflags );
}
static int sock_recv(int fd, void *msg, size_t len, int flags)
{
int ret;
......
......@@ -3336,9 +3336,9 @@ static DWORD send_frame( struct socket *socket, enum socket_opcode opcode, USHOR
static DWORD complete_send_frame( struct socket *socket, WSAOVERLAPPED *ovr, const char *buf )
{
DWORD ret, retflags, len, i;
DWORD ret, len, i;
if (!WSAGetOverlappedResult( socket->request->netconn->socket, ovr, &len, TRUE, &retflags ))
if (!netconn_wait_overlapped_result( socket->request->netconn, ovr, &len ))
return WSAGetLastError();
if (socket->bytes_in_send_frame_buffer)
......
......@@ -371,6 +371,7 @@ DWORD netconn_recv( struct netconn *, void *, size_t, int, int * ) DECLSPEC_HIDD
DWORD netconn_resolve( WCHAR *, INTERNET_PORT, struct sockaddr_storage *, int ) DECLSPEC_HIDDEN;
DWORD netconn_secure_connect( struct netconn *, WCHAR *, DWORD, CredHandle *, BOOL ) DECLSPEC_HIDDEN;
DWORD netconn_send( struct netconn *, const void *, size_t, int *, WSAOVERLAPPED * ) DECLSPEC_HIDDEN;
BOOL netconn_wait_overlapped_result( struct netconn *conn, WSAOVERLAPPED *ovr, DWORD *len ) DECLSPEC_HIDDEN;
void netconn_cancel_io( struct netconn *conn ) DECLSPEC_HIDDEN;
DWORD netconn_set_timeout( struct netconn *, BOOL, int ) DECLSPEC_HIDDEN;
BOOL netconn_is_alive( struct netconn * ) DECLSPEC_HIDDEN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment