This commit is contained in:
@@ -14,12 +14,12 @@ public class ConnexionStatusView extends BaseView {
|
||||
|
||||
private String displayText = "Connecting ...";
|
||||
|
||||
public ConnexionStatusView(StateMachine stateMachine, String address, short port)
|
||||
public ConnexionStatusView(StateMachine stateMachine, String pseudo, String address, short port)
|
||||
throws UnknownHostException, IOException {
|
||||
super(stateMachine);
|
||||
Thread t = new Thread(() -> {
|
||||
try {
|
||||
this.client = new Client(address, port);
|
||||
this.client = new Client(pseudo, address, port);
|
||||
bindListeners();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
@@ -29,12 +29,13 @@ public class ConnexionStatusView extends BaseView {
|
||||
t.start();
|
||||
}
|
||||
|
||||
public ConnexionStatusView(StateMachine stateMachine, short port) throws UnknownHostException, IOException {
|
||||
public ConnexionStatusView(StateMachine stateMachine, String pseudo, short port)
|
||||
throws UnknownHostException, IOException {
|
||||
super(stateMachine);
|
||||
Thread t = new Thread(() -> {
|
||||
try {
|
||||
this.server = new Server(port);
|
||||
this.client = new Client("localhost", port);
|
||||
this.client = new Client(pseudo, "localhost", port);
|
||||
bindListeners();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
Reference in New Issue
Block a user