public class UdpSocketChannel extends Object
| Constructor and Description |
|---|
UdpSocketChannel(String hostIp,
int portNumber,
int timeout,
boolean verbose) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
connect() |
PrintStream |
getOut() |
boolean |
isValid() |
static void |
main(String[] args) |
String |
readString() |
void |
sendString(String string) |
void |
setDebug(int debug) |
void |
setTimeout(int timeout) |
void |
setVerbosity(boolean verbose) |
public UdpSocketChannel(String hostIp, int portNumber, int timeout, boolean verbose) throws UnknownHostException
UnknownHostExceptionpublic void connect()
throws IOException
IOExceptionpublic 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 setVerbosity(boolean verbose)
public void setDebug(int debug)
public static void main(String[] args)
Copyright © 2015. All rights reserved.