public class ScmpSenderAsync extends Object implements AutoCloseable
| Modifier and Type | Class and Description |
|---|---|
static class |
ScmpSenderAsync.Builder |
static interface |
ScmpSenderAsync.ResponseHandler |
| Modifier and Type | Method and Description |
|---|---|
void |
abortAll() |
void |
close() |
ScmpSenderAsync.ResponseHandler |
getHandler() |
InetSocketAddress |
getLocalAddress() |
<T> T |
getOption(SocketOption<T> option) |
int |
getTimeOut() |
static ScmpSenderAsync.Builder |
newBuilder(ScmpSenderAsync.ResponseHandler handler) |
int |
sendEcho(Path path,
ByteBuffer payload)
Sends a SCMP echo request along the specified path.
|
List<Integer> |
sendTraceroute(Path path)
Sends a SCMP traceroute request along the specified path.
|
int |
sendTracerouteLast(Path path)
Sends a SCMP traceroute request along the specified path.
|
<T> void |
setOption(SocketOption<T> option,
T t)
This is currently only useful for
ScionSocketOptions.SCION_API_THROW_PARSER_FAILURE. |
void |
setOverrideSourceAddress(InetSocketAddress overrideSourceAddress)
Specify a source address override.
|
void |
setTimeOut(int milliSeconds) |
public static ScmpSenderAsync.Builder newBuilder(ScmpSenderAsync.ResponseHandler handler)
public void abortAll()
public ScmpSenderAsync.ResponseHandler getHandler()
public int sendEcho(Path path, ByteBuffer payload) throws IOException
After calling this method you may want to call abortAll() to abort potentially
remaining timeout timers from outstanding responses.
path - The path to use.payload - user data that is sent with the requestIOException - if an IO error occurs.public List<Integer> sendTraceroute(Path path) throws IOException
After calling this method you may want to call abortAll() to abort potentially
remaining timeout timers from outstanding responses.
path - The path to use.IOException - if an IO error occurs.public int sendTracerouteLast(Path path) throws IOException
After calling this method you may want to call abortAll() to abort potentially
remaining timeout timers from outstanding responses.
path - The path to use.IOException - if an IO error occurs.public void setTimeOut(int milliSeconds)
public int getTimeOut()
public void close()
throws IOException
close in interface AutoCloseableIOExceptionpublic <T> T getOption(SocketOption<T> option) throws IOException
IOExceptionpublic <T> void setOption(SocketOption<T> option, T t) throws IOException
ScionSocketOptions.SCION_API_THROW_PARSER_FAILURE.T - option typeoption - optiont - valueIOException - in case of IO errorpublic InetSocketAddress getLocalAddress() throws IOException
IOExceptionpublic void setOverrideSourceAddress(InetSocketAddress overrideSourceAddress)
AbstractDatagramChannel.setOverrideSourceAddress(InetSocketAddress).overrideSourceAddress - Override addressCopyright © 2024. All rights reserved.