Re: ServerSockets - When Is It Closed/Not Connected?



Hal Vaughan wrote:
I have a ServerSocket that creates a Socket with ServerSocket.accept(). I
then read data from that Socket's InputStream. I'm sending data to it with
netcat. When I stop netcat,

Stopped, so netcat did send a FIN, or just aborted midway in a TCP connection?

This is the first to check. Did netcat initiate the closing of the connection? If not, your server side just doesn't know that one end of the connection is gone.

/Thomas
--
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/
.



Relevant Pages

  • Re: ServerSockets - When Is It Closed/Not Connected?
    ... I'm sending data to it with ... When I stop netcat, there is no indication that I can see that the ... connection is gone and netcat's client socket is gone. ...
    (comp.lang.java.programmer)
  • Re: ServerSockets - When Is It Closed/Not Connected?
    ... I'm sending data to it with ... When I stop netcat, there is no indication that I can see that the ... connection is gone and netcat's client socket is gone. ...
    (comp.lang.java.help)
  • Re: Printing to an hp jetdirect via a device file
    ... it does a netcat to a jetdirect print server? ... > data will be read by the backgrounded netcat process. ... and using standard unix style network printing? ... sending data over raw devices. ...
    (comp.os.linux.questions)
  • Re: Port redirection problems?
    ... "Netcat has been dubbed the network swiss army knife. ... using TCP or UDP protocol. ... "nc host port" creates a TCP connection to the ...
    (comp.os.linux.networking)
  • Re: help interpreting the nmap output
    ... SSLProxy does run on ... > you could use telnet or netcat to try to communicate with it manually. ... >> netcat to establish a raw connection instead. ...
    (Security-Basics)