-
Notifications
You must be signed in to change notification settings - Fork 0
/
Client.java
36 lines (26 loc) · 893 Bytes
/
Client.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package client;
import server.Client_Profile;
import util.NetworkUtil;
import java.io.IOException;
import java.util.Scanner;
public class Client {
public static NetworkUtil networkUtil;
public Client(String serverAddress, int serverPort) {
try {
Client.networkUtil = new NetworkUtil(serverAddress, serverPort);
System.out.println("Connection Established");
new ClientMenu(Client.networkUtil);
} catch (Exception e) {
System.out.println("Connection failed");
System.out.println(e);
}
}
public static void main(String args[]) {
String serverAddress = "127.0.0.1"; // localhost ip is 127.0.0.1
int serverPort = 6666;
Client client = new Client(serverAddress, serverPort);
Scanner scanner = new Scanner(System.in);
while (true){
}
}
}