mirror of
https://github.com/corda/corda.git
synced 2025-06-19 15:43:52 +00:00
implement SocketChannel.isConnected
This commit is contained in:
@ -42,6 +42,10 @@ public class SocketChannel extends SelectableChannel
|
|||||||
return blocking;
|
return blocking;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isConnected() {
|
||||||
|
return connected;
|
||||||
|
}
|
||||||
|
|
||||||
public Socket socket() {
|
public Socket socket() {
|
||||||
return new Handle();
|
return new Handle();
|
||||||
}
|
}
|
||||||
@ -59,7 +63,10 @@ public class SocketChannel extends SelectableChannel
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean finishConnect() throws IOException {
|
public boolean finishConnect() throws IOException {
|
||||||
return natFinishConnect(socket);
|
if (! connected) {
|
||||||
|
connected = natFinishConnect(socket);
|
||||||
|
}
|
||||||
|
return connected;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void close() throws IOException {
|
public void close() throws IOException {
|
||||||
|
Reference in New Issue
Block a user