public Connector read(int bytes, Consumer<byte[]> consumer) {
		updateActionIfNotNull();
		byte[] data = new byte[bytes];
		if (in != null) {
			try {
				int r = -1;
				synchronized (in) {
					r = in.read(data);
				}
				if (r != -1) {
					if (r < bytes) {
						byte[] n = new byte[r];
						System.arraycopy(data, 0, n, 0, r);
						data = n;
					}
					consumer.accept(data);
				}

			} catch (IOException e) {
				error.addSuppressed(e);
				destroy();
			} finally {
				updateActionIfNotNull();
			}
		}
		return this;
	}