public class DhcpClient extends Object implements Client<DhcpRequest,DhcpResponse>
DhcpClient class.
| Constructor and Description |
|---|
DhcpClient() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
close
|
void |
connect(InetAddress address,
int port,
int timeout)
connect
|
int |
getRetries()
getRetries
|
DhcpResponse |
receiveBanner()
receiveBanner
|
DhcpResponse |
sendRequest(DhcpRequest request)
sendRequest
|
void |
setRetries(int retries)
setRetries
|
public void close()
close
close in interface Closeableclose in interface AutoCloseableclose in interface Client<DhcpRequest,DhcpResponse>public void connect(InetAddress address, int port, int timeout) throws IOException, Exception
connect
connect in interface Client<DhcpRequest,DhcpResponse>address - a InetAddress object.port - a int.timeout - a int.IOException - if any.Exception - if any.public DhcpResponse receiveBanner() throws IOException, Exception
receiveBanner
receiveBanner in interface Client<DhcpRequest,DhcpResponse>DhcpResponse object.IOException - if any.Exception - if any.public DhcpResponse sendRequest(DhcpRequest request) throws IOException, Exception
sendRequest
sendRequest in interface Client<DhcpRequest,DhcpResponse>request - a DhcpRequest object.DhcpResponse object.IOException - if any.Exception - if any.public void setRetries(int retries)
setRetries
retries - a int.public int getRetries()
getRetries
Copyright © 2020. All rights reserved.