Please help....

  • Thread starter Thread starter Vitamin
  • Start date Start date
V

Vitamin

How can I kill a socket in command except reboot the server?

I have created a socket by using Java program, which is written by myself

but I forget close the socket

now, whe I they "netstat -a" it prompt

TCP abcd:2046 123.123.123.123:23049 CLOSE_WAIT

where 2046 is local port and 23049 is remote port

thx~
 
To begin with the real issue here, one does not just close a socket, one
first finishes receiving pakets, if any, and then one closes a socket by
announcing a shutdown() (read the Winsock specification) and then close the
socket. How Java handles this i haven't a clue.
 
Though one may exist, I'm not aware of a Windows 2000 native utility that
will enable you to kill that socket. The TCPVIEW tool from sysinternals
seems to allow you to close open connections.

http://www.sysinternals.com/ntw2k/source/tcpview.shtml


--
--
Daniel Chang
Server Setup Team

Search our Knowledge Base at http://support.microsoft.com/directory
Visit the Windows 2000 Homepage at
http://www.microsoft.com/windows2000/default.asp
See the Windows NT Homepage at http://www.microsoft.com/ntserver/

NOTE: Please reply to the newsgroup and not directly to me. This allows
others to add to and benefit from these threads and also helps to ensure a
more timely response. Thank you!
This posting is provided "AS IS" without warranty either expressed or
implied, including, but not limited to, the implied warranties of
merchantability or fitness for a particular purpose.
The views and opinions expressed in this newsgroup posting are mine and do
not necessarily express or reflect the views and / or opinions of Microsoft.


: How can I kill a socket in command except reboot the server?
:
: I have created a socket by using Java program, which is written by myself
:
: but I forget close the socket
:
: now, whe I they "netstat -a" it prompt
:
: TCP abcd:2046 123.123.123.123:23049 CLOSE_WAIT
:
: where 2046 is local port and 23049 is remote port
:
: thx~
:
:
 
Back
Top