 
   @ok    <<0>>
   @error <<1>>
-  @null  <<-1 :: int>>
 
   def encode_op(op_name, args) do
     [req_code(op_name)|Enum.map(args, &encode_term/1)]

    end
  end

  def parse_header(@ok <> <<sid :: int, rest :: binary>>) do
    {:ok, sid, rest}
  end

  def parse_header(@error <> <<_sid :: int, rest :: binary>>) do
    {:error, rest}
  end

  def parse_header(_) do
    :incomplete
  end

  def parse(<<-1 :: int, rest :: binary>>, type) when type in [:string, :bytes] do
    {nil, rest}

    ]

    case GP.parse(data, parsers) do
      {[sid, token, _clusters, _config, _release], rest} -> {[sid, token], rest}
      :incomplete                                        -> :incomplete
    end
  end

