java socket: listen before accept?
问题 The context: I have a table of banned ip adresses, due to DOS attacks, in a collection somewhere in the memory of my program. 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. 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