Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: udpPacket

[213:14] (extern: com.lehman.aussom.AussomUdpPacket) extends: object

The udpPacket class implements UDP packet support.

Methods

  • udpPacket (int Size = 1476)

    Constructor creats a new udpPackat with the optional packet size and returns it.

    • @p Size is an int with the packet size.
    • @r This object.
  • newUdpPacket (int Size = 1472)

  • setAddress (string Address)

    Sets the packet address.

    • @p Address is a string with the value.
    • @r This object.
  • setData (object BufferObj)

    Sets the data for the packet with the provided Buffer object.

    • @p BufferObj is a Buffer object with the data to set.
    • @r This object.
  • setLength (int Length)

    Sets the packet length in bytes.

    • @p Length is an int with the value.
    • @r This object.
  • setPort (int Port)

    Sets the destination port number.

    • @p Port is an int with the value.
    • @r This object.
  • setSocketAddress (string Address, int Port)

    Sets the socket address and port with the provided arguments.

    • @p Address is a string with the value to set.
    • @p Port is an int with the port number to set.
    • @r This object.
  • setString (string Str, string Charset = "utf_8")

    Sets the string value with the provided string and optional character set value.

    • @p Str is a string to set in the payload.
    • @p Charset is an optional string with the character set to use.
    • @r This object.
  • getAddress ()

    Gets the packet address.

    • @r A string with the value.
  • getData ()

    Gets the packet data.

    • @r A Buffer object with the value.
  • size ()

    Gets the packet size in bytes.

    • @r An int with the value.
  • getOffset ()

    Gets the offset of the data in the packet.

    • @r An int with the value.
  • getPort ()

    Gets the packet port number.

    • @r An int with the port number.
  • getSocketAddress ()

    Gets the packet address.

    • @r A string with the address.
  • newBuffer (int Size = 1476)

    Creates a new Buffer with the provided size.

    • @p Size is the number of bytes for the Buffer.
    • @r A Buffer object.
  • getLength ()

    Gets the buffer length.

    • @r An int with the value.
  • getString (string Charset = "utf_8")

    Gets the buffer data as a string with the optional character set.

    • @p Charset is a string with the character set to use.
    • @r A string with the value.

class: udpSocket_module

[23:14] static extends: object

Module JAR loader class.

Methods

  • udpSocket_module ()

class: udpSocket

[32:14] (extern: com.lehman.aussom.AussomUdpSocket) extends: object

The udpSocket class implements UDP socket support.

Methods

  • udpSocket (string Host = null, int Port = null)

    Constructor creates a new UDP socket with the optional arguments and returns it.

    • @p Host is a string with the host to use.
    • @p Port is an int with the port number.
    • @r This object.
  • newUdpSocket (string Host = null, int Port = null)

  • bind (string Host = "localhost", int Port = 4444)

    Binds the socket to the local interface.

    • @p Host is a string with the host to bind to.
    • @p Port is an int with the port number to bind to.
    • @r This object.
  • close ()

    Closes the socket.

    • @r This object.
  • connect (string Host = "localhost", int Port = 4444)

    Connects the socket with the optional arguemnts.

    • @p Host is a string with the host.
    • @p Port is an int with the port number.
    • @r This object.
  • disconnect ()

    Disconnects the socket.

    • @r This object.
  • setBroadcast (bool SO_BROADCAST)

    Sets the socket broadcast flag.

    • @p SO_BROADCAST is a bool with the flag.
    • @r This object.
  • setRxBufferSize (int BufferSize)

    Sets the receive buffer size.

    • @p BufferSize is an int with the buffer size.
    • @r This object.
  • setTxBufferSize (int BufferSize)

    Sets the transmit buffer size.

    • @p BufferSize is an int with the buffer size.
    • @r This object.
  • setReuseAddress (bool Reuse)

    Sets the reuse address flag.

    • @p Reuse is a bool with the flag.
    • @r This object.
  • setSoTimeout (int SO_TIMEOUT)

    Sets the SO_TIMEOUT in milliseconds.

    • @p SO_TIMEOUT is an int with the timeout value.
    • @r This object.
  • setTrafficClass (int TrafficClass)

    Sets the DSCP traffic class.

    • @p TrafficClass is an int with the traffic class to set.
    • @r This object.
  • send (object PacketObject)

    Sends the provided packet.

    • @p PackateObject is a udpPacket object to send.
    • @r This object.
  • receive (object PacketObject)

    Receives a packet from the socket and stores it in the provided udpPacket object.

    • @p PacketObject is a udpPacket object to store the received packet into.
    • @r This object.
  • getBroadcast ()

    Gets the broadcast flag.

    • @r A bool with the flag value.
  • getInetAddress ()

    Gets the inet address.

    • @r A string with the value.
  • getLocalAddress ()

    Gets the local address.

    • @r A string with the value.
  • getLocalSocketAddress ()

    Gets the local socket address.

    • @r A string with the value.
  • getPort ()

    Gets the port number.

    • @r An int with the value.
  • getLocalPort ()

    Gets the local port number.

    • @r An int with the value.
  • getRxBufferSize ()

    Gets the receive buffer size.

    • @r An int with the value.
  • getTxBufferSize ()

    Gets the transmit buffer size.

    • @r An int with the value.
  • getSoTimeout ()

    Gets the SO_TIMEOUT in milliseconds value.

    • @r An int with the value.
  • getTrafficClass ()

    Get the DSCP traffic class value.

    • @r An int with the value.
  • isBound ()

    Gets the is bound flag.

    • @r A bool with the flag value.
  • isClosed ()

    Gets the is closed flag.

    • @r A bool with the flag value.
  • isConnected ()

    Gets the is connected flag.

    • @r A bool with the flag value.