
.. _structure-source:

:index:`Source Structure`
-------------------------

A Source structure is returned from :meth:`~.jetstream.recvinterface.RecvInterface.getSourcesAsync`. A "source" is a JetStream sending server, from the viewpoint of a receiving server. 

.. glossary::
   :sorted:
 
   :index:`activeTransferCount <pair: Source Structure; activeTransferCount>`
      The number of active transfers originating from a source.

   :index:`aveRecvRateWindow <pair: Source Structure; aveRecvRateWindow>`
      The transfer rate measured within a "window" of time, in kilobits-per-second. This shows the performance "right now".

   :index:`aveRecvRate <pair: Source Structure; aveRecvRate>`
      The average transfer rate for all transfers on a source, in kilobits-per-second. 

   :index:`completeTransferCount <pair: Source Structure; completeTransferCount>`
      The number of completed transfers from a source. 

   :index:`destinationPublicKey <pair: Source Structure; destinationPublicKey>`
      The public key for this destination. This public key must be specified for encrypted transfers to this server.

   :index:`encryptedConnectionState <pair: Source Structure; encryptedConnectionState>`
      Describes the state of the encryption negotiation, if using an encrypted connection. The value may be one of:

      - :index:`disconnected <triple: Source Structure; encryptedConnectionState; disconnected>`
      - :index:`negotiating <triple: Source Structure; encryptedConnectionState; negotiating>`
      - :index:`connected <triple: Source Structure; encryptedConnectionState; connected>`

   :index:`encryptionEnabled <pair: Source Structure; encryptionEnabled>`
      ``True`` if the server has encryption enabled (always on).

   :index:`errorTransferCount <pair: Source Structure; errorTransferCount>`
       The number of failed transfers from a source.

   :index:`inactiveTransferCount <pair: Source Structure; inactiveTransferCount>`
      The number of inactive transfers originating from a source.

   :index:`sourceIP <pair: Source Structure; sourceIP>`
       The IP for a source (i.e. the sending server).

   :index:`sourcePort <pair: Source Structure; sourcePort>`
      The port on which the source (i.e. sending server) is connected. 

