write
This commit is contained in:
@@ -360,17 +360,6 @@ public abstract class AsyncConnection implements Channel, AutoCloseable {
|
|||||||
write(bytes, offset, length, (byte[]) null, 0, 0, handler);
|
write(bytes, offset, length, (byte[]) null, 0, 0, handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
final void write(ByteTuple header, ByteTuple body, CompletionHandler<Integer, Void> handler) {
|
|
||||||
write(
|
|
||||||
header.content(),
|
|
||||||
header.offset(),
|
|
||||||
header.length(),
|
|
||||||
body == null ? null : body.content(),
|
|
||||||
body == null ? 0 : body.offset(),
|
|
||||||
body == null ? 0 : body.length(),
|
|
||||||
handler);
|
|
||||||
}
|
|
||||||
|
|
||||||
void write(
|
void write(
|
||||||
byte[] headerContent,
|
byte[] headerContent,
|
||||||
int headerOffset,
|
int headerOffset,
|
||||||
@@ -488,14 +477,6 @@ public abstract class AsyncConnection implements Channel, AutoCloseable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void writeInIOThread(ByteTuple header, ByteTuple body, CompletionHandler<Integer, Void> handler) {
|
|
||||||
if (inCurrWriteThread()) {
|
|
||||||
write(header, body, handler);
|
|
||||||
} else {
|
|
||||||
executeWrite(() -> write(header, body, handler));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public final void writeInIOThread(
|
public final void writeInIOThread(
|
||||||
byte[] headerContent,
|
byte[] headerContent,
|
||||||
int headerOffset,
|
int headerOffset,
|
||||||
|
|||||||
@@ -345,10 +345,6 @@ public abstract class Response<C extends Context, R extends Request<C>> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void writeInIOThread(ByteBuffer buffer) {
|
|
||||||
this.channel.writeInIOThread(buffer, buffer, finishBufferIOThreadHandler);
|
|
||||||
}
|
|
||||||
|
|
||||||
public final void finish(final byte[] bs) {
|
public final void finish(final byte[] bs) {
|
||||||
finish(false, bs, 0, bs.length);
|
finish(false, bs, 0, bs.length);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user