player.setCheckTask(checktask);
//设定定时检查,每十秒检查一次
manager.getTimer().schedule(checktask, 10 * 1000, 10 * 1000);
OutputMessage outMsg = MessageFactory.createSLoginRsp(validateCode);
player.putMessage(outMsg);
Player[] friends = player.getFriends();
OutputMessage outMsg2 = MessageFactory.createSFriendListRsp(friends);
player.putMessage(outMsg2);
//通知所有朋友已经上线.
OutputMessage outMsg3 = MessageFactory.createOnlineStatusNotify(player.getPlayerId(), true);
for(int i=0; i<friends.length; i++) {
friends[i].putMessage(outMsg3);
friends[i].flush();
}