# J2SE SMS Message Connection Implementation

Implementation classes for the SMS Message Connection layered on a `DatagramPacket` low-level transport.

A single class is shared by the J2ME client and the J2SE service to allow formatted messages to be transmitted across platforms.

`com.sun.midp.io.j2me.sms.SMSPacket` provides the interfaces to get/set fielded data packed into a binary datagram message.

## Configuration File

Properties can be set in a configuration file called "connections.prop" in the current working directory to override the built-in default values. Such values include the phone number of the device and the input/output port numbers for receiving/sending datagrams, respectively. A phone number may also configured in order to identify the address of the sender.

These are the default SMS configurations in `connections.prop`:

    #
    # The datagram host is the name of the client or /target device. Messages are
    # sent to and/or received from this client. The host can be an alias that maps
    # in /etc/hosts (UNIX/Linux systems) to a a real client device name. The alias
    # can also be mapped to the IP address of the device under test.
    #
    DatagramHost=wmadatagramhost
    #
    # The phone number starts with "+" and is followed by a number of digits
    # (e.g.: +5551234). The phone number represents the number of a device that
    # would contact the MIDP code under test. The phone number is the same across
    # all protocols.
    #
    PhoneNumber=+5551234

    #
    # SMS properties -- These properties are used by SMSMessageConnector.
    #
    # The "out" port is used for sending messages. The "in" port is used for
    # receiving messages and acknowledgements. The ports represent physical
    # transport-layer port numbers and may not match a port number in an SMS
    # address.
    #
    SMSDatagramPortOut=11100
    SMSDatagramPortIn=11101