# J2SE CBS Message Connection Implementation

Implementation classes for the CBS 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.cbs.CBSPacket` 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 datagrams, respectively. A phone number may also configured in order to identify the address of the "device.".

These are the default CBS 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

    #
    # CBS properties -- These properties are used by CBSMessageConnector.
    #
    # The "out" port is used for broadcasting CBS messages. The CBS client can only
    # receive the messages sent by the host. The port represents a physical
    # transport-layer port number and may not match a port number of a CBS address.
    #
    CBSDatagramPortOut=22200