com.dalsemi.tininet
Class TINIDatagramSocket
java.lang.Object
|
+--java.net.DatagramSocket
|
+--com.dalsemi.tininet.TINIDatagramSocket
- public class TINIDatagramSocket
- extends java.net.DatagramSocket
This subclass of DatagramSocket
is a faster and memory conserving version
of java.net.DatagramSocket.
TINIDatagramSocket is a direct drop-in
replacement. The receive() method is
the only method behaving slightly differently. Unlike
its superclass, TINIDatagramSocket.receive(p)
does not allocate a new InetAddress object
when the DatagramPacket p's address
is not null.
|
Constructor Summary |
TINIDatagramSocket()
Constructs a TINIDatagramSocket and binds
it to any available port on the local host machine. |
TINIDatagramSocket(int port)
Constructs a TINIDatagramSocket and binds
it to the specified port on the local host machine. |
TINIDatagramSocket(int port,
java.net.InetAddress laddr)
Constructs a TINIDatagramSocket and binds
it to the specified port and the specified address
on the local host machine. |
| Methods inherited from class java.net.DatagramSocket |
close,
getLocalAddress,
getLocalPort,
getSoTimeout,
receive,
send,
setSoTimeout |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
TINIDatagramSocket
public TINIDatagramSocket()
throws java.net.SocketException
- Constructs a
TINIDatagramSocket and binds
it to any available port on the local host machine.
- Throws:
- java.net.SocketException - if the socket could not be opened, or the
socket bind operation failed.
TINIDatagramSocket
public TINIDatagramSocket(int port)
throws java.net.SocketException
- Constructs a
TINIDatagramSocket and binds
it to the specified port on the local host machine.
- Parameters:
port - local port to use.- Throws:
- java.net.SocketException - if the socket could not be opened, or the
socket could not bind to the specified
local port.
TINIDatagramSocket
public TINIDatagramSocket(int port,
java.net.InetAddress laddr)
throws java.net.SocketException
- Constructs a
TINIDatagramSocket and binds
it to the specified port and the specified address
on the local host machine.
- Parameters:
port - local port to use.laddr - local address to use.- Throws:
- java.net.SocketException - if the socket could not be opened, or the
socket could not bind to the specified
local port and address.
Also see:
o TINI 1.12 API, Optional Modules
o TINI Home Page
o 1-Wire API
o JDK 1.1
Last update Tue Nov 18 14:06:22 CST 2003