[Qt-interest] Alternative for bind() in TCP sockets

Anisha Kaul anisha.kaul at hitechroboticsystemz.com
Tue Jan 25 06:35:29 CET 2011


I have made the server listen in the constructor and wrote a connect
call for the next pending connection (which return 1)

>From another connect call (which also returns 1) I have called a
function which is supposed to read the incoming data on server.
In the read() I have passed a char array as the first arg and 2 as
second args (i.e. number of bytes to be read)

Now the problem is the read() returns -1, which should have instead
returned 0, if there were no data!

any idea where I am going wrong?

-Anisha




-------------------------------------
Hi-Tech Gears Limited, Gurgaon, India







More information about the Qt-interest-old mailing list