   # Types of AMQP frames
   @amqp_frame 0
 
-  defmodule Frame, do: defstruct performative: :close, channel: 0, payload: ""
 
   defstruct host: "localhost",
     port: 5672,

    Logger.info "connect: got header"
    {:reply, :ok, %__MODULE__{state | socket: s, state: :hdr_exch}}
  end
  def handle_call({:close}, _from, state) do
    s = connection(state.state, %Frame{performative: :close}, state)
    {:stop, :normal, :ok, s}
  end


  use GenServer
  require Logger
  alias AmqpOne.Transport.Socket
  alias AmqpOne.Transport.Frame

  @type perf_t :: :open | :begin | :attach | :flow | :transfer |
  :disposition | :detch | :end | :close
