Socket programming
Hi folks,
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? Thanks maldini |
The HTTP server kills the connection after supplying the requested document. You'll have to reconnect for each request.
|
your a star!!!!!! It works
Thanks a lot It really helped me!! maldini |
But if you connect to HTTP 1.1 server it should accept a number of request in the same connection :)
|
You might be right, however the server which I'm communicating with is a HTTP/1.0 and I have tried recreating the socket and is is successful ............so I simply made a function Connect() and call each time i need to send in a request.
Thanks maldini |
All times are GMT -5. The time now is 03:24 PM. |