public final class FtCli extends Object implements Front
You must provide --port
argument. Without it, the
server won't start. If you want to start the server at random port, you
should specify a file name as the value of this --port
configuration
option. For example:
new FtCLI( new TkText("hello, world!"), "--port=/tmp/port.txt", "--threads=1", "--lifetime=3000" ).start(Exit.NEVER);
The code above will start a server and will never stop it. It will
work in the foreground. The server will be started at a random TCP
port and its number will be saved to /tmp/port.txt
file.
The class is immutable and thread-safe.
Constructor and Description |
---|
FtCli(Take tks,
Iterable<String> args)
Ctor.
|
FtCli(Take tks,
String... args)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
start(Exit exit)
Start and dispatch all incoming sockets.
|
public void start(Exit exit) throws IOException
Front
start
in interface Front
exit
- When to exitIOException
- If failsCopyright © 2015–2018 Take. All rights reserved.