PacketSender (Siena 2.0.4 API Documentation)
Date: 2015-05-17

siena.comm

## Interface PacketSender

- All Known Implementing Classes:
    KAZipPacketSender

      public interface PacketSender

  packet sender. Abstraction of a primitive communication mechanism for sending packets. Packets are chunks of bytes. A packet sender sends packets to a specific destination. Every implementation of Siena uses one or more packet senders to communicate with remote clients and servers.

  Packet senders are constructed by `PacketSenderFactory` using the URI of the corresponding receiver as a parameter.

  This version of Siena includes only a simple implementation on top of TCP/IP. Future versions will include support for encapsulation into other protocols, such as SMTP and HTTP.

  See Also:
    `PacketReceiver`

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getCost()` returns cost of packet transmissions
    `void` | `send(byte[] packet)` sends a packet.
    `void` | `send(byte[] packet, int len)` sends a packet.
    `void` | `send(byte[] packet, int offset, int len)` sends a packet.
    `void` | `shutdown()` closes this sender.

- - ### Method Detail

    - #### send

          void send(byte[] packet)
                    throws PacketSenderException

      sends a packet.
      Throws:
        `PacketSenderException`

    - #### send

          void send(byte[] packet,
                  int len)
                    throws PacketSenderException

      sends a packet.
      Throws:
        `PacketSenderException`

    - #### send

          void send(byte[] packet,
                  int offset,
                  int len)
                    throws PacketSenderException

      sends a packet.
      Throws:
        `PacketSenderException`

    - #### shutdown

          void shutdown()
                        throws PacketSenderException

      closes this sender.
      Throws:
        `PacketSenderException`

    - #### getCost

          int getCost()

      returns cost of packet transmissions

Copyright © 2000-2005 University of Colorado.
Copyright © 2005-2011 Antonio Carzaniga.
This documentation is maintained by Antonio Carzaniga