Re: "java.net.BindException: Address already in use: connect" ? ?
- From: "Ingo R. Homann" <ihomann_spam@xxxxxx>
- Date: Thu, 28 Jul 2005 11:59:55 +0200
Hi,
cmk128@xxxxxxxxxxx wrote:
> Hi
> My java slcient connect to the server may many time by socket. My
> problem is: "socket.close()" doesn't release the local port. After
> running "new Socket()" many time, it will get "java.net.BindException:
> Address already in use: connect" exception.
> If i specify the local port to be use by "new
> Socket("localhoist",18001,InetAddress.getLocalHost(),18002)", it get
> the same error, because "socket.close()" doesn't release the port.
> thanks
> from Peter (cmk128@xxxxxxxxxx)
Sounds to me like the *Socket* will be closed, but of course, the
*ServerSocket* will not be closed as well. The ServerSocket must be
closed explicitely.
Ciao,
Ingo
.
- References:
- Prev by Date: "java.net.BindException: Address already in use: connect" ? ?
- Next by Date: Connect to Web interface to process data
- Previous by thread: "java.net.BindException: Address already in use: connect" ? ?
- Next by thread: Re: "java.net.BindException: Address already in use: connect" ? ?
- Index(es):
Relevant Pages
|
|