protected void readStreamEnd(Socket socket, boolean enableTimeout) throws IOException {
		InputStream in = socket.getInputStream();
		byte[] term = new byte[TERM_LENGTH];
		int total = 0;
		// TODO: no timeout currently employed - if we do we need to prevent timeout here
		// if (!enableTimeout) {
		// socket.setSoTimeout(0);
		// }
		while (total < term.length) {
			int readlen = in.read(term, total, term.length - total);
			if (readlen < 0) {
				throw new EOFException("unexpected end of stream");
			}
			total += readlen;
		}
		checkTerminator(term);
	}
Read the stream terminator from the socket. Timeout should be disabled
for the side which has written the stream to the socket output.
@param socket connected socket
@param enableTimeout true if timeout should be used on read, else false
           TODO: no timeouts currently used (relies on BufferFile handle)
@throws IOException
@throws EOFException if stream terminated unexpectedly (e.g., cancelled)
Ghidra/Features/GhidraServer/src/main/java/ghidra/server/stream/RemoteBlockStreamHandle.java