 
   @default_timeout 20_000
   @ssl_header_byte 0x16
+  @tcp_header_byte 0x00
 
   @typedoc "A module that implements the :ranch_transport behaviour"
   @type transport :: :ranch_tcp

        close(state)

      nil ->
        receive_message(state)

      {optional, ssl_opts} when optional in [:required, :optional] ->
        peek_first_byte(optional, ssl_opts, state)

        finish_span(span, result: "tcp_rejected")
        close(state)

      {:ok, @tcp_header_byte} when optional in [:disabled, :optional] ->
        finish_span(span, result: "tcp")
        receive_message(state)

      {:ok, _other_byte} ->
        Logger.error(fn ->
          format_log("peek_first_byte", "unknown protocol", state)
        end)

        finish_span(span, result: "unknown_protocol")
        close(state)

      {:error, closed} when closed in [:closed, :econnreset, :timeout] ->
        finish_span(span, result: to_string(closed))
