From 4dd706f491ef25bc8412ee0fd63c956cdd5d7eeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=9C=B0=E5=B9=B3=E7=BA=BF?= <22250530@qq.com> Date: Mon, 2 Nov 2015 10:52:33 +0800 Subject: [PATCH] --- src/com/wentch/redkale/net/AsyncConnection.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/wentch/redkale/net/AsyncConnection.java b/src/com/wentch/redkale/net/AsyncConnection.java index dcbca565b..ca34ebd7f 100644 --- a/src/com/wentch/redkale/net/AsyncConnection.java +++ b/src/com/wentch/redkale/net/AsyncConnection.java @@ -264,7 +264,7 @@ public abstract class AsyncConnection implements AsynchronousByteChannel, AutoCl try { int rs = 0; 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); } catch (IOException e) { @@ -295,7 +295,7 @@ public abstract class AsyncConnection implements AsynchronousByteChannel, AutoCl @Override public void write(ByteBuffer src, A attachment, CompletionHandler handler) { try { - int rs = channel.write(src); + int rs = channel.send(src, remoteAddress); if (handler != null) handler.completed(rs, attachment); } catch (IOException e) { if (handler != null) handler.failed(e, attachment); @@ -305,7 +305,7 @@ public abstract class AsyncConnection implements AsynchronousByteChannel, AutoCl @Override public Future write(ByteBuffer src) { try { - int rs = channel.write(src); + int rs = channel.send(src, remoteAddress); return new SimpleFuture(rs); } catch (IOException e) { throw new RuntimeException(e);