private void handleFrame() throws IOException {
		
		if(logger.isDebugEnabled()) { logger.debug(">>> Frame read by "+id); }
		
		if(frame.getOpCode() == OpCode.CLOSE && status != Status.CLOSING) {
			sendCloseFrame();
			return;
		}
		
		if(frame.getOpCode() == OpCode.PING) {
			logger.debug(">>> Ping"); 
			outgoingFrames.add(FrameBuffer.createControlFrame(OpCode.PONG));
			return;
		}
		
		if(frame.getOpCode() == OpCode.PONG) {
			logger.debug(">>> Pong");
			pingSentTime = 0;
			return;
		}
		
		if(frame.isFinal() == false) {
			logger.debug(">>> Continuation Frame");
			frames.add(frame);
			return;
		}
		
		if(frames.size() > 0) {
			
			frames.add(frame);
			webSocketListener.onMessage(this, MaskedFrame.join(frames));
			for(MaskedFrame mf : frames) {
				MaskedFrame.returnFrame(mf);
			}
			
			frames.clear();
		} else {
			webSocketListener.onMessage(this, frame.getText());
			MaskedFrame.returnFrame(frame);
		}
	}