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 |
connect() |
void |
disconnect() |
void |
flush() |
boolean |
isConnected() |
void |
reconnect() |
Proto.Msg |
sendMaybeRecvMessage(Proto.Msg msg) |
Proto.Msg |
sendRecvMessage(Proto.Msg msg) |
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 sendMaybeRecvMessage(Proto.Msg msg) throws IOException
sendMaybeRecvMessage in interface SynchronousTransportIOExceptionpublic Proto.Msg sendRecvMessage(Proto.Msg msg) throws IOException
sendRecvMessage in interface SynchronousTransportIOExceptionpublic boolean isConnected()
isConnected in interface Transportpublic void connect()
throws IOException
connect in interface TransportIOExceptionpublic void disconnect()
throws IOException
disconnect in interface TransportIOExceptionpublic void reconnect()
throws IOException
reconnect in interface TransportIOExceptionpublic void flush()
throws IOException
flush in interface TransportIOExceptionCopyright © 2014. All rights reserved.