EchoUDPClient
public class DiscardUDPClient extends DatagramSocketClient
DiscardTCPClient
Modifier and Type | Field | Description |
---|---|---|
static int |
DEFAULT_PORT |
The default discard port.
|
_isOpen_, _socket_, _socketFactory_, _timeout_
Constructor | Description |
---|---|
DiscardUDPClient() |
Modifier and Type | Method | Description |
---|---|---|
void |
send(byte[] data,
int length,
java.net.InetAddress host) |
Same as
send(data, length, host. |
void |
send(byte[] data,
int length,
java.net.InetAddress host,
int port) |
Sends the specified data to the specified server at the specified port.
|
void |
send(byte[] data,
java.net.InetAddress host) |
Same as
send(data, data.length, host. |
close, getDefaultTimeout, getLocalAddress, getLocalPort, getSoTimeout, isOpen, open, open, open, setDatagramSocketFactory, setDefaultTimeout, setSoTimeout
public static final int DEFAULT_PORT
public void send(byte[] data, int length, java.net.InetAddress host, int port) throws java.io.IOException
data
- The discard data to send.length
- The length of the data to send. Should be less than
or equal to the length of the data byte array.host
- The address of the server.port
- The service port.java.io.IOException
- If an error occurs during the datagram send
operation.public void send(byte[] data, int length, java.net.InetAddress host) throws java.io.IOException
send(data, length, host. DiscardUDPClient.DEFAULT_PORT)
.java.io.IOException
public void send(byte[] data, java.net.InetAddress host) throws java.io.IOException
send(data, data.length, host. DiscardUDPClient.DEFAULT_PORT)
.java.io.IOException
Copyright © 1997-2002 Daniel F. Savarese. All Rights Reserved.