@Override
	public ReceivedData receive() {
		
		newBuffer();
		
		ReceivedData out = new ReceivedData();
		// TODO Auto-generated method stub
		if(socket != null && is != null){
			try {
				int len = is.read(buffer);
				if(len != -1){
					out.data = Arrays.copyOf(buffer,buffer.length);
					out.length = len;
					out.address = addr;
					out.port = port;
				}
				
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
		
		return out;
	}