static void checkHandshakeInitialByte(@NotNull final DataInput dis) throws IOException {
    final byte initialByte = dis.readByte();
    if (initialByte != 0) {
      throw new IllegalStateException(
          format("Detected non Geode peer during handshake due to initial byte being %s",
              initialByte));
    }
  }
Returns true if handshake was read successfully, false otherwise.
geode-core/src/main/java/org/apache/geode/internal/tcp/Connection.java