title: java socket: listen before accept?
body: <p>The context: I have a table of banned ip adresses, due to DOS attacks, in a collection somewhere in the memory of my program.</p>
  
  <p>I use a TCP server socket, accepting every connection, then I check the ip address, and then I either close the connection or continue processing the client.</p>
  
  <p>I'd like to know if it's possible, in Java, to listen for incomming connections on a TCP server socket, and accept or refuse somehow to establish the tcp link, given the ip address of the requesting client. I mean without having to accept &amp; to close the client socket, which is what I'm already doing.</p>
  
  <p>Thanks.</p>