import java.util.*; import java.net.*; public class Socketsv03 { public static void main(String[] args){ try{ G106WinLF.set(); Scanner stdin = new Scanner(System.in); System.out.print("ポート番号 : "); int port = Integer.parseInt(stdin.nextLine()); ServerSocket ssock = new ServerSocket(port); for(int i = 0; i < 5; i++){ Socket sock = ssock.accept(); new Thread(new Framecom03(sock, i)).start(); } ssock.close(); }catch(Exception ex){ System.out.println("終了しました。"); } } }