private void onRead(SocketChannel sc) {
		try {
			if (this.ioHandler == null) {
				logger.error("未绑定ioHandler");
				return;
			}
			Object msg=null;
			IoHandler handler = this.ioHandler;
			IoSession session = socketChannelSessionMap.get(sc);
			if(this.socketEnum==NioSocketEnum.SERVER){
				msg=handler.onRead(sc);
				if(msg!=null&&msg instanceof NioSessionClient){
					System.out.println("服务端读事件1。。。");
					NioSessionClient nsc=((NioSessionClient)msg);
	            	System.out.println("---------接收序列化对象getUsername-----="+nsc.getUsername());
	            	System.out.println("---------接收序列化对象sc-----="+nsc.getChannel());
	            	System.out.println("---------接收序列化对象socket-----="+nsc.getLocalIp()+":"+nsc.getLocalPort());
	            	
	            	//设置服务端的客户信息....
	            	Iterator<SocketChannel> iter = socketChannelSessionMap.keySet().iterator();	            	
	    			while(iter.hasNext()){
	    				SocketChannel key=iter.next();
	    				if(key.socket().getPort()==nsc.getLocalPort()){
	    					System.out.println("---------key.socket().getPort()socket-----="+key.socket().getPort());
	    					NioSession s = (NioSession)socketChannelSessionMap.get(key);
	    					s.setUsername(nsc.getUsername());
	    					s.setPassword(nsc.getPassword());
	    					socketChannelSessionMap.put(key, s);
	    				}
	    			}
	            }else{	      
					System.out.println("服务端读事件2。。。");
					this.registerSocket(session, SelectionKey.OP_READ);
					session.setReceiveMessage(msg);
	            }
			}
			if(this.socketEnum==NioSocketEnum.CLIENT){
				System.out.println("客户端读事件。。。");
				msg = handler.onRead(sc);		
				this.registerSocket(session, SelectionKey.OP_READ);
				session.setReceiveMessage(msg);		
			}
			Event event = new Event(EventEnum.E_READ_DATA);
			event.setSession(session);
			addEventQueue(event);			
		} catch (NioException e) {
//			e.printStackTrace();
			//此处异常有些古怪 ，关闭后正常,程序后不断进行onRead操作
			Event event = new Event(EventEnum.E_CLOSE_SESSION);
			event.setSc(sc);
			doCloseSession(event);
		} catch (Exception e) {
//			e.printStackTrace();
			Event event = new Event(EventEnum.E_CLOSE_SESSION);
			event.setSc(sc);
			doCloseSession(event);
		}
	}