Código
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package sockets_talk;
/**
*
* @author Mapers
*/
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
public class Servidor {
public static final int puerto = 9999;
private static ServerSocket SS;
private static Socket S;
public static void main(String[] args)throws IOException {
try {
SS = new ServerSocket(puerto);
S=SS.accept();
Talk talk = new Talk(S, "Servidor");
talk.hablar();
S.close();
SS.close();
System.exit(0);
} catch (Exception e) {
e.printStackTrace();
}
}
}
el error me sale justo
Código
SS = new ServerSocket(puerto);










Autor


En línea







