@Override public void process(Channel ctx) { if (ctx.isInitial()) { return; } ctx.writeln(ctx.readln().toUpperCase()); }
@Override public void process(Channel ctx) { if (ctx.isInitial()) { ctx.writeln("Hi there!"); return; } eq(ctx.readln(), "HI THERE!"); }
@Override public W write(File file) { long size = file.length(); U.must(size < Integer.MAX_VALUE); conn.write(file); return wrote((int) size); }
@Override public W writeln(String s) { byte[] bytes = s.getBytes(); conn.write(bytes); conn.write(CR_LF); return wrote(bytes.length + 2); }
@Override public boolean isClosed() { return conn.isClosed(); }
@Override public Buf input() { return conn.input(); }
@Override public T close() { conn.close(); return meT(); }
@Override public W write(byte[] bytes, int offset, int length) { conn.write(bytes, offset, length); return wrote(length); }
@Override public ChannelHolder createHolder() { return conn.createHolder(); }
@Override public long connId() { return conn.connId(); }
@Override public synchronized boolean isInitial() { return conn.isInitial(); }
@Override public InetSocketAddress getAddress() { return conn.getAddress(); }
@Override public RapidoidHelper helper() { return conn.helper(); }
@Override public String readN(int count) { return conn.readN(count); }
@Override public String readln() { return conn.readln(); }
@Override public Buf output() { return conn.output(); }
@Override public void waitUntilClosing() { conn.waitUntilClosing(); }
@Override public Buf buffer() { return conn.input(); }
@Override public void log(String msg) { conn.log(msg); }
@Override public T restart() { conn.restart(); return meT(); }
@Override public synchronized ConnState state() { return conn.state(); }
@Override public W async() { conn.async(); return meW(); }
@Override public String address() { return conn.address(); }
@Override public boolean isAsync() { return conn.isAsync(); }
@Override public W write(byte[] bytes) { conn.write(bytes); return wrote(bytes.length); }
@Override public W writeJSON(Object value) { conn.writeJSON(value); return meW(); }
@Override public W write(ByteBuffer buf) { int n = buf.remaining(); conn.write(buf); return wrote(n); }
public W send() { conn.send(); return meW(); }
@Override public W done() { conn.done(); return meW(); }
@Override public T closeIf(boolean condition) { conn.closeIf(condition); return meT(); }