cannot read data send by server
Patrice
toussaint15 at yahoo.fr
Thu Feb 3 23:50:34 PST 2011
Hello
i am trying to read the data send by the printer to the server through the network by using httpRead and ippRead functions. my code is as follow:
void read_file()
{
http_t *http = httpConnect("254.123.27.2", 631); //connect to server
ipp_t *ipp = ippNew();
ipp_state_t status;
while ((status = ippRead(http, ipp)) != IPP_ERROR)
if (status == IPP_DATA)
break;
if (status == IPP_DATA)
{
cout <<"Data to be read"<<endl;
//data will be read here using httpRead
}
}
my problem is that the i do not get to the second if statement. what could possibly be the problem.
I am using cups with Qt4 library so there is a Qt4 signal that checks if there is a data pending on the server and the data will be read using httpRead/ippRead
More information about the cups
mailing list