Liking cljdoc? Tell your friends :D

jdk.net.DatagramPacket

This class represents a datagram packet.

Datagram packets are used to implement a connectionless packet delivery service. Each message is routed from one machine to another based solely on information contained within that packet. Multiple packets sent from one machine to another might be routed differently, and might arrive in any order. Packet delivery is not guaranteed.

This class represents a datagram packet.

Datagram packets are used to implement a connectionless packet
delivery service. Each message is routed from one machine to
another based solely on information contained within that packet.
Multiple packets sent from one machine to another might be routed
differently, and might arrive in any order. Packet delivery is
not guaranteed.
raw docstring

->datagram-packetclj

(->datagram-packet buf length)
(->datagram-packet buf offset length)
(->datagram-packet buf offset length address)
(->datagram-packet buf offset length address port)

Constructor.

Constructs a datagram packet for sending packets of length length with offset ioffsetto the specified port number on the specified host. The length argument must be less than or equal to buf.length.

buf - the packet data. - byte[] offset - the packet data offset. - int length - the packet data length. - int address - the destination address. - java.net.InetAddress port - the destination port number. - int

Constructor.

Constructs a datagram packet for sending packets of length
 length with offset ioffsetto the
 specified port number on the specified host. The
 length argument must be less than or equal to
 buf.length.

buf - the packet data. - `byte[]`
offset - the packet data offset. - `int`
length - the packet data length. - `int`
address - the destination address. - `java.net.InetAddress`
port - the destination port number. - `int`
raw docstring

get-addressclj

(get-address this)

Returns the IP address of the machine to which this datagram is being sent or from which the datagram was received.

returns: the IP address of the machine to which this datagram is being sent or from which the datagram was received. - java.net.InetAddress

Returns the IP address of the machine to which this datagram is being
 sent or from which the datagram was received.

returns: the IP address of the machine to which this datagram is being
          sent or from which the datagram was received. - `java.net.InetAddress`
raw docstring

get-dataclj

(get-data this)

Returns the data buffer. The data received or the data to be sent starts from the offset in the buffer, and runs for length long.

returns: the buffer used to receive or send data - byte[]

Returns the data buffer. The data received or the data to be sent
 starts from the offset in the buffer,
 and runs for length long.

returns: the buffer used to receive or  send data - `byte[]`
raw docstring

get-lengthclj

(get-length this)

Returns the length of the data to be sent or the length of the data received.

returns: the length of the data to be sent or the length of the data received. - int

Returns the length of the data to be sent or the length of the
 data received.

returns: the length of the data to be sent or the length of the
          data received. - `int`
raw docstring

get-offsetclj

(get-offset this)

Returns the offset of the data to be sent or the offset of the data received.

returns: the offset of the data to be sent or the offset of the data received. - int

Returns the offset of the data to be sent or the offset of the
 data received.

returns: the offset of the data to be sent or the offset of the
          data received. - `int`
raw docstring

get-portclj

(get-port this)

Returns the port number on the remote host to which this datagram is being sent or from which the datagram was received.

returns: the port number on the remote host to which this datagram is being sent or from which the datagram was received. - int

Returns the port number on the remote host to which this datagram is
 being sent or from which the datagram was received.

returns: the port number on the remote host to which this datagram is
          being sent or from which the datagram was received. - `int`
raw docstring

get-socket-addressclj

(get-socket-address this)

Gets the SocketAddress (usually IP address port number) of the remote host that this packet is being sent to or is coming from.

returns: the SocketAddress - java.net.SocketAddress

Gets the SocketAddress (usually IP address  port number) of the remote
 host that this packet is being sent to or is coming from.

returns: the SocketAddress - `java.net.SocketAddress`
raw docstring

set-addressclj

(set-address this iaddr)

Sets the IP address of the machine to which this datagram is being sent.

iaddr - the InetAddress - java.net.InetAddress

Sets the IP address of the machine to which this datagram
 is being sent.

iaddr - the InetAddress - `java.net.InetAddress`
raw docstring

set-dataclj

(set-data this buf)
(set-data this buf offset length)

Set the data buffer for this packet. This sets the data, length and offset of the packet.

buf - the buffer to set for this packet - byte[] offset - the offset into the data - int length - the length of the data and/or the length of the buffer used to receive data - int

throws: java.lang.NullPointerException - if the argument is null

Set the data buffer for this packet. This sets the
 data, length and offset of the packet.

buf - the buffer to set for this packet - `byte[]`
offset - the offset into the data - `int`
length - the length of the data and/or the length of the buffer used to receive data - `int`

throws: java.lang.NullPointerException - if the argument is null
raw docstring

set-lengthclj

(set-length this length)

Set the length for this packet. The length of the packet is the number of bytes from the packet's data buffer that will be sent, or the number of bytes of the packet's data buffer that will be used for receiving data. The length must be lesser or equal to the offset plus the length of the packet's buffer.

length - the length to set for this packet. - int

throws: java.lang.IllegalArgumentException - if the length is negative of if the length is greater than the packet's data buffer length.

Set the length for this packet. The length of the packet is
 the number of bytes from the packet's data buffer that will be
 sent, or the number of bytes of the packet's data buffer that
 will be used for receiving data. The length must be lesser or
 equal to the offset plus the length of the packet's buffer.

length - the length to set for this packet. - `int`

throws: java.lang.IllegalArgumentException - if the length is negative of if the length is greater than the packet's data buffer length.
raw docstring

set-portclj

(set-port this iport)

Sets the port number on the remote host to which this datagram is being sent.

iport - the port number - int

Sets the port number on the remote host to which this datagram
 is being sent.

iport - the port number - `int`
raw docstring

set-socket-addressclj

(set-socket-address this address)

Sets the SocketAddress (usually IP address port number) of the remote host to which this datagram is being sent.

address - the SocketAddress - java.net.SocketAddress

throws: java.lang.IllegalArgumentException - if address is null or is a SocketAddress subclass not supported by this socket

Sets the SocketAddress (usually IP address  port number) of the remote
 host to which this datagram is being sent.

address - the SocketAddress - `java.net.SocketAddress`

throws: java.lang.IllegalArgumentException - if address is null or is a SocketAddress subclass not supported by this socket
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close