public void listenSocket()
    {
	    long deltaTime = System.currentTimeMillis() - lastDataTime;
	    if(!this.socket.isClosed() && deltaTime<TIMEOUT)
        {
	        int currentBytesAvailable = 0;

	        try {
		        currentBytesAvailable = inputStream.available();
	        } catch (IOException e) {
		        e.printStackTrace();
	        }

	        if(currentBytesAvailable > 0)
            {
	            //log.debug("receive " + currentBytesAvailable + " bytes");
				read();
            }
        }
	    else
        {
	        log.debug("time out");
            internalClose();
        }
    }