Commit 5b05887b authored by mohammadmahdihn's avatar mohammadmahdihn
Browse files

push konam pull konid

parent c4199768
......@@ -8,6 +8,7 @@ import org.view.LoginMenuView;
import java.io.*;
import java.net.Socket;
import java.util.ArrayList;
import java.util.Scanner;
public class MainClient {
......@@ -17,7 +18,7 @@ public class MainClient {
public static void initializeNetwork() {
try {
socket = new Socket("localhost", 7677);
socket = new Socket("localhost", 7877);
dataInputStream = new DataInputStream(socket.getInputStream());
dataOutputStream = new DataOutputStream(socket.getOutputStream());
} catch (IOException x) {
......@@ -27,10 +28,15 @@ public class MainClient {
public static void main(String[] args) throws Exception {
initializeNetwork();
dataOutputStream.writeUTF("2");
dataOutputStream.flush();
String result = dataInputStream.readUTF();
System.out.println("4");
while(true){
Scanner scanner = new Scanner(System.in);
String string = scanner.nextLine();
dataOutputStream.writeUTF(string);
dataOutputStream.flush();
String result = dataInputStream.readUTF();
System.out.println(result);
}
// restoreDatabase();
// new LoginMenuView().run();
}
......
......@@ -16,7 +16,7 @@ public class MainServer {
public void initializeNetwork() {
try {
serverSocket = new ServerSocket(7677);
serverSocket = new ServerSocket(7877);
while(true){
Socket socket = serverSocket.accept();
startNewThread(socket);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment