try {
if (packet.isEnd()) {
close(null);
return;
}
final Message message = packet.message();
if (message instanceof Request) {
serverInvoke(packet.requestNumber(), (Request)message);
} else { // Reply
writeReply(packet.requestNumber(), (Reply)message);
}