News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

about http-get

Started by Mr. Sade, September 08, 2006, 03:54:46 AM

Previous topic - Next topic

Mr. Sade

Hi

i am using the socket() function to get a webpage (http/1.0), and i am receiving the events (connect, read, close)  in my main window.
the problem is i am not getting the whole webpage because i am receiving a FD_CLOSE notification before a FD_READ.
when i get the FD_CLOSE notification i close the socket (closesocket) if i dont close the socket i receive the whole webpage.
but why i am receiving a read notification after the close notification.

how can i fix this ?
thnks you

btw i am sending "GET %page% HTTP/1.0",13,10,13,10 to the wer server.

ToutEnMasm


Hello,
First,verify the WM_SOCKET message is really for this socket.It can be for another.
                                      ToutEnMasm


.ELSEIF uMsg== WM_SOCKET
; instal by WSAAsyncSelect
mov edx,wParam ;socket
.if edx != Your socket here
;not for me
jmp EndOfWM_SOCKET
.endif
HIWORD lParam ;error code
mov edx,eax
LOWORD lParam ;event FD_.....