App now asks for address
This commit is contained in:
parent
6e0ad2c943
commit
355b83a97a
@ -4,13 +4,17 @@ import org.apache.log4j.LogManager;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Scanner;
|
||||
|
||||
public class App {
|
||||
private static final Logger logger = LogManager.getLogger(App.class);
|
||||
|
||||
public static void main(String[] args){
|
||||
try {
|
||||
Connection connection = new Connection("localhost");
|
||||
Scanner scanner = new Scanner(System.in);
|
||||
System.out.print("Enter server IP address (leave blank if hosting): ");
|
||||
String address = scanner.nextLine();
|
||||
Connection connection = new Connection(address);
|
||||
Interactive interactive = new Interactive(connection.getIn(), connection.getOut());
|
||||
interactive.beginLoopAs(connection.isHost());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user