[问题] Channel/Socket Close in Java

Jingle

本站元老
VIP
注册
2004-01-06
消息
11,126
荣誉分数
4,088
声望点数
373
Can DatagramChannel.close() close its associate DatagramSocket?

Current I am using channel.close(). But next time, when try to open channel, retrieve socket, then bind(), some time it said "address already in use". Seems like the socket is not closed, or the port is not free from last close.

Thanks for the answers and discussions.
 
后退
顶部