     {:ok, hostname} = :inet.gethostname()
     frame = %Frame.Open{container_id: "AmqpOne"<>role,
       hostname: "#{hostname}",
-      max_frame_size: 1024*1024, channel_max: 10}
+      max_frame_size: 1024*1024, channel_max: 10,
+      idle_time_out: 5_000, properties: %{}
+    }
     new_state = connection(state.state, frame, state)
   end
 

    Logger.error "We should send this frame to someone else"
    state
  end
  def connection(:close_sent, {:tcp, {0, %Frame.Close{} = f}}, state) do
    AmqpOne.Transport.Socket.close(state.socket)
    %__MODULE__{state | state: :end}
  end
  def connection(:close_rcvd, %Frame.Close{}= f, state) do
    :ok = AmqpOne.Transport.Socket.send(state.socket, encode_frame(0, f))
    AmqpOne.Transport.Socket.close(state.socket)
    %__MODULE__{state | state: :end}
  end
  def conncetion(:open_pipe, %Frame.Close{} = f, state) do
    :ok = AmqpOne.Transport.Socket.send(state.socket, encode_frame(0, f))
    %__MODULE__{state | state: :oc_pipe}
  end
  def conncetion(:open_pipe, @amqp_header, state) do
    %__MODULE__{state | state: :open_sent}
  end
  def conncetion(:close_pipe, {:tcp, {0, %Frame.Open{} = f}}, state) do
    Logger.info "Got an open frame: #{inspect f}"
    %__MODULE__{state | state: :close_sent, connection_parameters: f}
  end

    Socket.set_active_once(state.socket)
    put_in(state, :state, :hdr_rcvd)
  end
  def connection(:hdr_sent, f = %Frame.Open{}, state) do
    # we are sending an open directly after the hdr: pipelining!
    AmqpOne.Transport.Socket.send(state.socket, encode_frame(0, f))
    %__MODULE__{state | state: :open_pipe}
