Hi Esmond
That wouldn't have any different effect to not calling accept() at all in
blocking mode
Clearly there is a difference. Please see the samples in [1] & [2] and
execute them to see this. The TestAccept1 below allows one to open more
than one connection at a time, even when only one accept() call is made
as has been explained in [1]
import java.net.ServerSocket;
import java.net.Socket;
public class TestAccept1 {
public static void main(String[] args) throws Exception {
ServerSocket serverSocket = new ServerSocket(8280, 0);
Socket socket = serverSocket.accept();
Thread.sleep(3000000); // do nothing
}
}
[1]
http://esbmagic.blogspot.com/2012/10/does-tomcat-bite-more-than-it-can-chew.html
[2]
http://esbmagic.blogspot.com/2012/11/how-to-stop-biting-when-you-cant-chew.html
regards
asankha
--
Asankha C. Perera
AdroitLogic, http://adroitlogic.org
http://esbmagic.blogspot.com