?? testappprocessor.java
字號:
package com.ec.generalserver;
import java.nio.ByteBuffer;
import java.nio.channels.SocketChannel;
public class TestAppProcessor extends AppProcessor
{
public void doProcess(Connection conn) throws ConnectionProcessException
{
// TODO Auto-generated method stub
try
{
ByteBuffer buf = ByteBuffer.allocate(1024);
SocketChannel sock = conn.getSocket();
sock.read(buf);
buf.flip();
sock.write(buf);
}
catch(Exception e)
{
e.printStackTrace();
throw new ConnectionProcessException(conn,"exception occur"+e.getLocalizedMessage());
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -