org.apache.commons.net.echo
public final class EchoUDPClient extends DiscardUDPClient
open
and call send
to send datagrams to the server,
then call receive
to receive echoes.
After you're done echoing data, call
close()
to clean up properly.
See Also: EchoTCPClient
Field Summary | |
---|---|
static int | DEFAULT_PORT The default echo port. |
Method Summary | |
---|---|
int | receive(byte[] data, int length)
Receives echoed data and returns its length. |
int | receive(byte[] data) Same as receive(data, data.length) ** |
Returns: Length of actual data received.
Throws: IOException If an error occurs while receiving the data.
receive(data, data.length)
**