During the execution of client server programming in vc++
i got "Receive() error 2006" in the client side.where i did mistake.
During the execution of client server programming in vc++
i got "Receive() error 2006" in the client side.where i did mistake.
Receive() error 2006
ititrx
DavidThi808
If the first option, then the Receive() succeeded and the 2006 means the number of bytes received. If the second option, then I think that you didn't call GetLastError() immediately after the Receive(), so I guess that you should call the GetLastError() immediately after the Receive().
If you still have troubles then send a snippest of your code. Also I suggest sending your question to win32.programmer.networks group:
http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.win32.programmer.networks
Bob Lyden
Hello
Re: Receive() error 2006
I am going to mark this thread as answered since you have not followed up with any further information on your problem - I assume you solved the problem yourself or one of the suggestions in this thread helped you solved the problem. If you have a solution you could post it so others can find it. If you do not have a solution then please submit further details and then mark the thread as unanswered.
Thanks
Damien
j_johnso
It is not clear what is client. We cannot guess it is CSocket or CAsyncSocket, since the third argument of Receive does not seems to be appropriate.
willajo
ret = client.Receive(resbody, sizeof(resbody), &receivebytes)
here ret value is 2006,whats th reason.