Package org.drasyl.example.time
Class TimeClient
- java.lang.Object
-
- org.drasyl.DrasylNode
-
- org.drasyl.example.time.TimeClient
-
public class TimeClient extends DrasylNode
Starts a node which sends an empty message to the given address. Expects a reply with the time in seconds since midnight on January first 1900. Based on the Time Protocol.- See Also:
TimeServer
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TimeClient(DrasylConfig config)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(String[] args)
void
onEvent(Event event)
-
Methods inherited from class org.drasyl.DrasylNode
getBestEventLoop, getVersion, identity, irrevocablyTerminate, pipeline, send, send, shutdown, start
-
-
-
-
Constructor Detail
-
TimeClient
protected TimeClient(DrasylConfig config) throws DrasylException
- Throws:
DrasylException
-
-
Method Detail
-
onEvent
public void onEvent(@NonNull Event event)
- Specified by:
onEvent
in classDrasylNode
-
main
public static void main(String[] args) throws ExecutionException, InterruptedException, DrasylException
-
-