| java.lang.Object org.apache.harmony.jndi.provider.dns.TransportMgr
TransportMgr | public class TransportMgr (Code) | | Contains service methods that are used for transporting DNS messages from DNS
client to DNS server and vice versa.
|
Method Summary | |
public static InetAddress | getIPByName_OS(String hostname) Tries to determine IP address by hostname using
Inet4Address.getByName(String) method. | public static int | sendReceiveTCP(String server, int serverPort, byte[] outBuf, int outBufLen, byte[] inBuf, int inBufLen, int timeout) Establishes TCP connection, transmit bytes from inBuf ,
stores received answer in outBuf . | public static int | sendReceiveUDP(String server, int serverPort, byte[] outBuf, int outBufLen, byte[] inBuf, int inBufLen, int timeout) Sends the packet contained in outBuf , receives the answer
and stores it in inBuf array. |
sendReceiveTCP | public static int sendReceiveTCP(String server, int serverPort, byte[] outBuf, int outBufLen, byte[] inBuf, int inBufLen, int timeout) throws DomainProtocolException, SocketTimeoutException, SecurityException(Code) | | Establishes TCP connection, transmit bytes from inBuf ,
stores received answer in outBuf .
Parameters: server - the server's IP-address in string form Parameters: serverPort - server port Parameters: outBuf - bytes of the message to send Parameters: outBufLen - length of the outBuf Parameters: inBuf - buffer to store received bytes at Parameters: inBufLen - length of the inBuf Parameters: timeout - time to wait for an answer, in milliseconds; 0 stands forinfinite timeout number of received bytes throws: SocketTimeoutException - in case of timeout throws: SecurityException - if security violation error occured; normally this happens ifthe access to the network subsystem has not been granted throws: DomainProtocolException - if some configuration or network problem encountered TODOpool of connections may speed up things |
sendReceiveUDP | public static int sendReceiveUDP(String server, int serverPort, byte[] outBuf, int outBufLen, byte[] inBuf, int inBufLen, int timeout) throws DomainProtocolException, SocketTimeoutException, SecurityException(Code) | | Sends the packet contained in outBuf , receives the answer
and stores it in inBuf array.
Parameters: server - server's IP-address in string form Parameters: serverPort - server port Parameters: outBuf - bytes of the message to send Parameters: outBufLen - length of the outBuf Parameters: inBuf - buffer to store received bytes at Parameters: inBufLen - length of the inBuf Parameters: timeout - time to wait for an answer, in milliseconds; 0 stands forinfinite timeout number of received bytes throws: SocketTimeoutException - in case of timeout throws: SecurityException - if security violation error occured; normally this happens ifthe access to the network subsystem has not been granted throws: DomainProtocolException - if some configuration or network problem encountered |
|
|