public class SimpleUdpTransport extends Object implements SynchronousTransport
| Modifier and Type | Field and Description |
|---|---|
boolean |
cacheDns |
static int |
DEFAULT_PORT |
| Constructor and Description |
|---|
SimpleUdpTransport(InetSocketAddress address) |
SimpleUdpTransport(int port) |
SimpleUdpTransport(String host) |
SimpleUdpTransport(String host,
int port) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
connect() |
void |
flush() |
boolean |
isConnected() |
void |
reconnect() |
Proto.Msg |
sendMessage(Proto.Msg msg) |
Transport |
transport() |
public static final int DEFAULT_PORT
public volatile boolean cacheDns
public SimpleUdpTransport(InetSocketAddress address)
public SimpleUdpTransport(String host, int port) throws IOException
IOExceptionpublic SimpleUdpTransport(String host) throws IOException
IOExceptionpublic SimpleUdpTransport(int port)
throws IOException
IOExceptionpublic Proto.Msg sendMessage(Proto.Msg msg) throws IOException
sendMessage in interface SynchronousTransportIOExceptionpublic boolean isConnected()
isConnected in interface Transportpublic void connect()
throws IOException
connect in interface TransportIOExceptionpublic void close()
close in interface Transportclose in interface AutoCloseablepublic void reconnect()
throws IOException
reconnect in interface TransportIOExceptionpublic void flush()
throws IOException
flush in interface TransportIOExceptionCopyright © 2015. All rights reserved.