public class UdpSocketChannel extends Object
| Constructor and Description |
|---|
UdpSocketChannel(InetAddress inetAddress,
int portNumber,
int timeout,
boolean verbose) |
UdpSocketChannel(String hostIp,
int portNumber,
int timeout,
boolean verbose) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
PrintStream |
getOut() |
boolean |
isValid() |
static void |
main(String[] args) |
String |
readString() |
void |
sendString(String string) |
void |
setDebug(int debug) |
void |
setTimeout(int timeout) |
void |
setVerbose(boolean verbose) |
public UdpSocketChannel(InetAddress inetAddress, int portNumber, int timeout, boolean verbose) throws UnknownHostException, SocketException
UnknownHostExceptionSocketExceptionpublic UdpSocketChannel(String hostIp, int portNumber, int timeout, boolean verbose) throws UnknownHostException, SocketException
UnknownHostExceptionSocketExceptionpublic static void main(String[] args)
public void sendString(String string) throws IOException
IOExceptionpublic void close()
throws IOException
IOExceptionpublic PrintStream getOut()
public String readString() throws SocketException, IOException
SocketExceptionIOExceptionpublic boolean isValid()
public void setTimeout(int timeout)
throws SocketException
SocketExceptionpublic void setVerbose(boolean verbose)
public void setDebug(int debug)
Copyright © 2020. All rights reserved.