Kann eine von SelectedKeys ungültig ist?

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Kann eine von SelectedKeys ungültig ist?

by Guest » 11 Feb 2025, 04:55

Ich habe den folgenden Code.

Code: Select all

            final SelectionKey clientKey;
if (client.connect(_Rfc863Constants.SERVER_ENDPOINT)) {
log.debug("connected to {}", client.getRemoteAddress());
clientKey = client.register(selector, SelectionKey.OP_WRITE);
} else {
clientKey = client.register(selector, SelectionKey.OP_CONNECT);
}
_Rfc863Utils.readQuitAndCall(() -> {
clientKey.cancel(); //

Top