private StreamRequest readStreamRequest() throws IOException {

			// Stream request header must be received quickly and processed quickly
			GTimerMonitor requestReadTimer =
				GTimer.scheduleRunnable(REQUEST_HEADER_TIMEOUT_MS, () -> {
					try {
						socket.close();
					}
					catch (IOException e) {
						// ignore
					}
				});

			// read stream connection request info which must be the first
			// content sent from client
			byte[] headerBytes;
			try {
				InputStream in = socket.getInputStream();
				headerBytes = new byte[RemoteBlockStreamHandle.HEADER_LENGTH];
				int index = 0;
				while (index < headerBytes.length) {
					int cnt = in.read(headerBytes, index, headerBytes.length - index);
					if (cnt < 0) {
						throw new SocketException("connection closed by client");
					}
					index += cnt;
				}
			}
			finally {
				requestReadTimer.cancel();
			}

			return RemoteBlockStreamHandle.parseStreamRequestHeader(headerBytes);
		}
Read the stream request header which must be the first input 
received from the client.
@return StreamRequest data presented by client
@throws IOException if an IO error occurs
Ghidra/Features/GhidraServer/src/main/java/ghidra/server/stream/BlockStreamServer.java