mirror of
https://github.com/corda/corda.git
synced 2025-02-05 10:39:13 +00:00
implement SocketChannel.isConnected
This commit is contained in:
parent
3c893b2ee3
commit
efdfb796d9
@ -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 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user