private void accept() throws IOException, SocketTimeoutException {
		Socket socket = this.socket.accept();
		if(socket == null){
			logger.error("socket accept is NULL!");
			return;
		}
		
		//int port = socket.getPort();
		long result = 0;  
		for (byte b: socket.getInetAddress().getAddress())  
		{  
		    result = result << 8 | (b & 0xFF);  
		}
		//InetAddress ip = socket.getInetAddress();
		int idx = this.address.getPort() - 17301;
		//System.out.println(this.address.getPort() + ":" + port);
		//System.out.println(ip.toString());
		//if((port % 6) != idx){
		/*if((result % 9) != idx){
			socket.close();
			return;
		}*/

		try {
			logger.debug("New incoming connection ...");
			Handshake hs = this.validateHandshake(socket, null);
			this.sendHandshake(socket);
			this.fireNewPeerConnection(socket, hs.getPeerId());
		} catch (ParseException pe) {
			logger.error("Invalid handshake from {}: {}",
				this.socketRepr(socket), pe.getMessage());
			try { socket.close(); } catch (IOException e) { }
		} catch (IOException ioe) {
			logger.error("An error occured while reading an incoming " +
					"handshake: {}", ioe.getMessage());
			try {
				if (!socket.isClosed()) {
					socket.close();
				}
			} catch (IOException e) {
				// Ignore
			}
		}
	}