這是我的代碼,當我在eclipse中的調試模式下運行它時,它告訴我它不會停止停留在代碼中,箭頭。TCP連接,serversocket.accept運行時不會創建套接字
private ServerSocket serverSocket = null;
private Socket socket= null;
private ObjectInputStream inputStream= null;
public void ConnectTCP(){
try{
serverSocket = new ServerSocket(5000);
---->socket = serverSocket.accept();
inputStream = new ObjectInputStream(socket.getInputStream());
System.out.print("Server is Running");
}catch(IOException e){
e.printStackTrace();
}
}