• 2022-06-28
    如何判断一个Socket对象当前是否处于连接状态?
    A: boolean isConnected=socket.isConnected() && socket.isBound();
    B: boolean isConnected=socket.isConnected() && !socket.isClosed();
    C: boolean isConnected=socket.isConnected() && !socket.isBound();
    D: boolean isConnected=socket.isConnected();