| View previous topic :: View next topic |
| Author |
Message |
Keith Maclaine New Programmer
Joined: 23 Jun 2006 Posts: 12
|
Hi everybody , i have one question about HTTP/1.1 persistante connections .. if i have connection to server, the connection is in state open , the server sends me the FIN packet what should i do then ? I mean sending back FIN/ACK is the work of java librarys not ?
Reply with quote
|
| |
|
|
BigDaddy Enthusiastic Coder
Joined: 26 May 2006 Posts: 147
|
Keith Maclaine, it depends...
do you close the connection?
do you work with sockets or URLConnection?
Reply with quote
|
| |
|
|
Keith Maclaine New Programmer
Joined: 23 Jun 2006 Posts: 12
|
BigDaddy , well i dont close connection after sending some request becouse of this should be persistante conn.
Reply with quote
|
| |
|
|
BigDaddy Enthusiastic Coder
Joined: 26 May 2006 Posts: 147
|
hard to keep it persistent if the server closes...
but still, are you using sockets or URLConnection
Reply with quote
|
| |
|
|
Keith Maclaine New Programmer
Joined: 23 Jun 2006 Posts: 12
| |
BigDaddy Enthusiastic Coder
Joined: 26 May 2006 Posts: 147
|
writing correct http/1.1 socket code is quite hard...
why not use an existing library?
URLConnection uses persistent connections if it can. My proxy does it as well, commons net from apache probably does to
Reply with quote
|
| |
|
|
Keith Maclaine New Programmer
Joined: 23 Jun 2006 Posts: 12
|
well my question is what is has to be done when my app receives for any reason FIN packet from server
Reply with quote
|
| |
|
|
BigDaddy Enthusiastic Coder
Joined: 26 May 2006 Posts: 147
| |
Keith Maclaine New Programmer
Joined: 23 Jun 2006 Posts: 12
| |
BigDaddy Enthusiastic Coder
Joined: 26 May 2006 Posts: 147
|
no...
are you using blocking io or selector based non-blocking io?
Reply with quote
|
| |
|
|
| Page 1 of 2 |
Goto page 1, 2 Next |
|