I have a question regarding socket programming. I am able to acces an HTTP/1.0 server and I am trying to send multiple requests to it. The problem is the server seems to accept and answer only the first request but not the successive ones. This is the scenario:
connect(); //succesful (done in the constructor of a class)
write() //succesful (done in fn1 of a class)
read() //succesful (done in fn1 of a class)
write()// succesful (done in fn2 of a class)
read() = -1 => not succesful (done in fn2 of a class)
NOTE: The function calls are internal to the class so there is no problem of killing the connection to the socket by killing the object!!
Could you give me some hints on how to do this please?