This commit is contained in:
@@ -264,7 +264,7 @@ public abstract class AsyncConnection implements AsynchronousByteChannel, AutoCl
|
|||||||
try {
|
try {
|
||||||
int rs = 0;
|
int rs = 0;
|
||||||
for (int i = offset; i < offset + length; i++) {
|
for (int i = offset; i < offset + length; i++) {
|
||||||
rs += channel.write(srcs[i]);
|
rs += channel.send(srcs[i], remoteAddress);
|
||||||
}
|
}
|
||||||
if (handler != null) handler.completed(rs, attachment);
|
if (handler != null) handler.completed(rs, attachment);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
@@ -295,7 +295,7 @@ public abstract class AsyncConnection implements AsynchronousByteChannel, AutoCl
|
|||||||
@Override
|
@Override
|
||||||
public <A> void write(ByteBuffer src, A attachment, CompletionHandler<Integer, ? super A> handler) {
|
public <A> void write(ByteBuffer src, A attachment, CompletionHandler<Integer, ? super A> handler) {
|
||||||
try {
|
try {
|
||||||
int rs = channel.write(src);
|
int rs = channel.send(src, remoteAddress);
|
||||||
if (handler != null) handler.completed(rs, attachment);
|
if (handler != null) handler.completed(rs, attachment);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
if (handler != null) handler.failed(e, attachment);
|
if (handler != null) handler.failed(e, attachment);
|
||||||
@@ -305,7 +305,7 @@ public abstract class AsyncConnection implements AsynchronousByteChannel, AutoCl
|
|||||||
@Override
|
@Override
|
||||||
public Future<Integer> write(ByteBuffer src) {
|
public Future<Integer> write(ByteBuffer src) {
|
||||||
try {
|
try {
|
||||||
int rs = channel.write(src);
|
int rs = channel.send(src, remoteAddress);
|
||||||
return new SimpleFuture(rs);
|
return new SimpleFuture(rs);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
|||||||
Reference in New Issue
Block a user