I have a little problem with connect when the host isnt listening..
As i think i'm using a blocking model , the connect call doesnt return, and
i need tho continue execution.
how can I solve easily this?
thanks
As i think i'm using a blocking model , the connect call doesnt return, and
i need tho continue execution.
how can I solve easily this?
invoke connect,sock,addr sin,sizeof sin
.if eax!=SOCKET_ERROR
invoke send,sock,addr GET,SIZEOF GET,0
.while sizetoread==0
invoke Sleep, 1
invoke ioctlsocket,sock,FIONREAD,addr sizetoread
.if sizetoread!=0
invoke recv,sock,addr buff,sizetoread,0
Print buff
.endif
.EndW
.endif
thanks
extra threads + blocking sockets, or async sockets (traditional select() method or WSAAsyncSelect or WSAEventSelect). Have a look at www.madwizard.org ?