Package org.xbill.DNS
Class TCPClient
java.lang.Object
org.xbill.DNS.TCPClient
- All Implemented Interfaces:
AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SelectionKeyprivate final longprivate final Duration -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidbind(SocketAddress addr) private voidblockUntil(SelectionKey key) voidclose()(package private) voidconnect(SocketAddress addr) (package private) byte[]recv()private byte[]recv(int length) (package private) voidsend(byte[] data)
-
Field Details
-
startTime
private final long startTime -
timeout
-
key
-
-
Constructor Details
-
TCPClient
TCPClient(Duration timeout) throws IOException - Throws:
IOException
-
-
Method Details
-
bind
- Throws:
IOException
-
connect
- Throws:
IOException
-
send
- Throws:
IOException
-
recv
- Throws:
IOException
-
blockUntil
- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-
recv
- Throws:
IOException
-