public byte[] processFrame(byte[] frameData) throws IOException {
		logger.debug("Hybi07-processFrame");
		Hybi07Frame newFrame = new Hybi07Frame();
		byte[] unusedData = newFrame.populate(frameData);
		if(!newFrame.isFinalFragment()){
			/*TODO: ADD SUPPORT FOR MESSAGE FRAGMENTATION*/
		}else{
			OpCode frameType = newFrame.getOpCode();
			if(frameType==OpCode.TEXT_FRAME){
				this.websocket.onMessageReceived(newFrame.getPayloadText());
			}else if (frameType==OpCode.CONNECTION_CLOSE){
				this.close();
			}else if(frameType==OpCode.PING){
				Hybi07Frame responseFrame = new Hybi07Frame();
				responseFrame.setOpCode(OpCode.PONG);
				responseFrame.setPayloadData(newFrame.payloadData);
				this.websocket.send(responseFrame);
			}else if(frameType==OpCode.PONG){
				//keep-alive response, ignore.
			}else if(frameType==OpCode.BINARY_FRAME){
			}else if(frameType==OpCode.CONTINUATION_FRAME){
				
			}
		}
		return unusedData;
	}