def build_and_send_packet(kind, type, payload, target, options = {}, &callback)
      if (packet = build_packet(kind, type, payload, target, options, &callback))
        action = type.split('/').last
        received_at = @request_stats.update(action, packet.token)
        @request_kind_stats.update((packet.selector == :all ? "fanout" : kind.to_s)[5..-1])
        send("#{@mode}_send", kind, target, packet, received_at, &callback)
      end
      true
    end
def build_and_send_packet(kind, type, payload, target, options = {}, &callback)
      if (packet = build_packet(kind, type, payload, target, options, &callback))
        action = type.split('/').last
        received_at = @request_stats.update(action, packet.token)
        @request_kind_stats.update((packet.selector == :all ? "fanout" : kind.to_s)[5..-1])
        send("#{@mode}_send", kind, target, packet, received_at, &callback)
      end
      true
    end
Build and send packet

 === Parameters
 kind(Symbol):: Kind of request: :send_push or :send_request
 type(String):: Dispatch route for the request; typically identifies actor and action
 payload(Object):: Data to be sent with marshalling en route
 target(Hash|NilClass):: Target for request
   :agent_id(String):: Identity of specific target
   :tags(Array):: Tags that must all be associated with a target for it to be selected
   :scope(Hash):: Scoping to be used to restrict routing
     :account(Integer):: Restrict to agents with this account id
     :shard(Integer):: Restrict to agents with this shard id, or if value is Packet::GLOBAL,
       ones with no shard id
   :selector(Symbol):: Which of the matched targets to be selected: :any or :all
 options(Hash):: Request options
   :token(String):: Universally unique ID for request; defaults to random generated
   :time_to_live(Numeric):: Number of seconds before a request expires and is to be ignored;
     non-positive value or nil means never expire for :send_push and means use configured
     time-to-live for :send_request

 === Block
 Optional block used to process response asynchronously with the following parameter:
   result(Result):: Response with an OperationResult of SUCCESS, RETRY, NON_DELIVERY, or ERROR

 === Return
 true:: Always return true

 === Raise
 ArgumentError:: If target invalid