This commit is contained in:
andrzej 2024-11-10 16:31:35 +01:00
parent 8ca4ea90f0
commit a575c57743
1 changed files with 21 additions and 0 deletions

21
Main.java Normal file
View File

@ -0,0 +1,21 @@
import java.net.ServerSocket;
import java.net.Socket;
public class Main {
public static void main(String[] args) throws Exception {
try (ServerSocket serverSocket = new ServerSocket(8080)) {
System.out.println("listening on socket 8080...");
while (true) {
try (Socket client = serverSocket.accept()) {
handleClient(client);
}
}
}
}
public static void handleClient(Socket client) {
}
}