def build_association_request(presentation_contexts, user_info)
      # Big endian encoding:
      @outgoing.endian = @net_endian
      # Clear the outgoing binary string:
      @outgoing.reset
      # Note: The order of which these components are built is not arbitrary.
      # (The first three are built 'in order of appearance', the header is built last, but is put first in the message)
      append_application_context
      append_presentation_contexts(presentation_contexts, ITEM_PRESENTATION_CONTEXT_REQUEST, request=true)
      append_user_information(user_info)
      # Header must be built last, because we need to know the length of the other components.
      append_association_header(PDU_ASSOCIATION_REQUEST, @host_ae)
    end
def build_association_request(presentation_contexts, user_info)
      # Big endian encoding:
      @outgoing.endian = @net_endian
      # Clear the outgoing binary string:
      @outgoing.reset
      # Note: The order of which these components are built is not arbitrary.
      # (The first three are built 'in order of appearance', the header is built last, but is put first in the message)
      append_application_context
      append_presentation_contexts(presentation_contexts, ITEM_PRESENTATION_CONTEXT_REQUEST, request=true)
      append_user_information(user_info)
      # Header must be built last, because we need to know the length of the other components.
      append_association_header(PDU_ASSOCIATION_REQUEST, @host_ae)
    end
Builds the binary string which is sent as the association request.

 === Parameters

 * <tt>presentation_contexts</tt> -- A hash containing abstract_syntaxes, presentation context ids and transfer syntaxes.
 * <tt>user_info</tt> -- A user information items array.