Inlined too trivial write() method
This commit is contained in:
parent
e0c14e096a
commit
2e363ee918
@ -349,7 +349,7 @@ class NioDatagramWorker implements Runnable {
|
||||
}
|
||||
}
|
||||
if ((readyOps & SelectionKey.OP_WRITE) != 0) {
|
||||
write(k);
|
||||
write((NioDatagramChannel) k.attachment());
|
||||
}
|
||||
} catch (CancelledKeyException e) {
|
||||
close(k);
|
||||
@ -370,10 +370,6 @@ class NioDatagramWorker implements Runnable {
|
||||
return false;
|
||||
}
|
||||
|
||||
private void write(SelectionKey k) {
|
||||
write((NioDatagramChannel) k.attachment());
|
||||
}
|
||||
|
||||
/**
|
||||
* Read is called when a Selector has been notified that the underlying channel
|
||||
* was something to be read. The channel would previously have registered its interest
|
||||
|
@ -280,7 +280,7 @@ class NioWorker implements Runnable {
|
||||
}
|
||||
}
|
||||
if ((readyOps & SelectionKey.OP_WRITE) != 0) {
|
||||
write(k);
|
||||
write((NioSocketChannel) k.attachment());
|
||||
}
|
||||
} catch (CancelledKeyException e) {
|
||||
close(k);
|
||||
@ -361,11 +361,6 @@ class NioWorker implements Runnable {
|
||||
return true;
|
||||
}
|
||||
|
||||
private void write(SelectionKey k) {
|
||||
NioSocketChannel ch = (NioSocketChannel) k.attachment();
|
||||
write(ch);
|
||||
}
|
||||
|
||||
private void close(SelectionKey k) {
|
||||
NioSocketChannel ch = (NioSocketChannel) k.attachment();
|
||||
close(ch, succeededFuture(ch));
|
||||
|
Loading…
Reference in New Issue
Block a user