示例#1
0
 @Override
 public void process(Channel ctx) {
   if (ctx.isInitial()) {
     return;
   }
   ctx.writeln(ctx.readln().toUpperCase());
 }
示例#2
0
        @Override
        public void process(Channel ctx) {
          if (ctx.isInitial()) {
            ctx.writeln("Hi there!");
            return;
          }

          eq(ctx.readln(), "HI THERE!");
        }
示例#3
0
 @Override
 public W write(File file) {
   long size = file.length();
   U.must(size < Integer.MAX_VALUE);
   conn.write(file);
   return wrote((int) size);
 }
示例#4
0
 @Override
 public W writeln(String s) {
   byte[] bytes = s.getBytes();
   conn.write(bytes);
   conn.write(CR_LF);
   return wrote(bytes.length + 2);
 }
示例#5
0
 @Override
 public boolean isClosed() {
   return conn.isClosed();
 }
示例#6
0
 @Override
 public Buf input() {
   return conn.input();
 }
示例#7
0
 @Override
 public T close() {
   conn.close();
   return meT();
 }
示例#8
0
 @Override
 public W write(byte[] bytes, int offset, int length) {
   conn.write(bytes, offset, length);
   return wrote(length);
 }
示例#9
0
 @Override
 public ChannelHolder createHolder() {
   return conn.createHolder();
 }
示例#10
0
 @Override
 public long connId() {
   return conn.connId();
 }
示例#11
0
 @Override
 public synchronized boolean isInitial() {
   return conn.isInitial();
 }
示例#12
0
 @Override
 public InetSocketAddress getAddress() {
   return conn.getAddress();
 }
示例#13
0
 @Override
 public RapidoidHelper helper() {
   return conn.helper();
 }
示例#14
0
 @Override
 public String readN(int count) {
   return conn.readN(count);
 }
示例#15
0
 @Override
 public String readln() {
   return conn.readln();
 }
示例#16
0
 @Override
 public Buf output() {
   return conn.output();
 }
示例#17
0
 @Override
 public void waitUntilClosing() {
   conn.waitUntilClosing();
 }
示例#18
0
 @Override
 public Buf buffer() {
   return conn.input();
 }
示例#19
0
 @Override
 public void log(String msg) {
   conn.log(msg);
 }
示例#20
0
 @Override
 public T restart() {
   conn.restart();
   return meT();
 }
示例#21
0
 @Override
 public synchronized ConnState state() {
   return conn.state();
 }
示例#22
0
 @Override
 public W async() {
   conn.async();
   return meW();
 }
示例#23
0
 @Override
 public String address() {
   return conn.address();
 }
示例#24
0
 @Override
 public boolean isAsync() {
   return conn.isAsync();
 }
示例#25
0
 @Override
 public W write(byte[] bytes) {
   conn.write(bytes);
   return wrote(bytes.length);
 }
示例#26
0
 @Override
 public W writeJSON(Object value) {
   conn.writeJSON(value);
   return meW();
 }
示例#27
0
 @Override
 public W write(ByteBuffer buf) {
   int n = buf.remaining();
   conn.write(buf);
   return wrote(n);
 }
示例#28
0
 public W send() {
   conn.send();
   return meW();
 }
示例#29
0
 @Override
 public W done() {
   conn.done();
   return meW();
 }
示例#30
0
 @Override
 public T closeIf(boolean condition) {
   conn.closeIf(condition);
   return meT();
 }