Java實作的基於socket通訊的實例程式碼
伺服器端程式碼:複製程式碼如下:import java.io.BufferedReader;import java.io.InputStreamReader;import java.net.ServerSocket;import java.net.Socket;public class Server {public static void main(String[] args ) {ServerSocket server;try{server = new ServerSocket(1111);Socket
2024-11-19