1

In this site use socket for send message to the server. I haven't any Error in this project but I doesn't work and don't show nothings in avd, help me to run it. I think the port number or IP number is false and don't know what number is correct. Did I need to install something?

Zain Aftab
  • 703
  • 7
  • 21
mehrdad eilbeygi
  • 133
  • 1
  • 15

1 Answers1

1

try this in client.java

class ClientThread implements Runnable {

@Override
public void run() { 
    try {
        socket = new Socket();
        InetSocketAddress socketAddress = new InetSocketAddress(SERVER_IP, SERVERPORT);
        socket.connect(socketAddress);

    } catch (UnknownHostException e1) {

        e1.printStackTrace();
    }catch (IOException e1) {
        e1.printStackTrace();
    }
}     
}
Arya
  • 1,729
  • 3
  • 17
  • 35