docs: protected void invoke (Connection connection, Object target, InvokeMethod invokeMethod) {
  		if (DEBUG) {
  			String argString = "";
  			if (invokeMethod.args != null) {
  				argString = Arrays.deepToString(invokeMethod.args);
  				argString = argString.substring(1, argString.length() - 1);
  			}
  			debug("kryonet", connection + " received: " + target.getClass().getSimpleName() + "#"
  				+ invokeMethod.cachedMethod.method.getName() + "(" + argString + ")");
  		}
  
  		byte responseData = invokeMethod.responseData;
  		boolean transmitReturnValue = (responseData & returnValueMask) == returnValueMask;
  		boolean transmitExceptions = (responseData & returnExceptionMask) == returnExceptionMask;
  		int responseID = responseData & responseIdMask;
  
  		CachedMethod cachedMethod = invokeMethod.cachedMethod;
  		Object result = null;
  		try {
  			result = cachedMethod.invoke(target, invokeMethod.args);
  		} catch (InvocationTargetException ex) {
  			if (transmitExceptions)
  				result = ex.getCause();
  			else
  				throw new KryoNetException("Error invoking method: " + cachedMethod.method.getDeclaringClass().getName() + "."
  					+ cachedMethod.method.getName(), ex);
  		} catch (Exception ex) {
  			throw new KryoNetException(
  				"Error invoking method: " + cachedMethod.method.getDeclaringClass().getName() + "." + cachedMethod.method.getName(),
  				ex);
  		}
  
  		if (responseID == 0) return;
  
  		InvokeMethodResult invokeMethodResult = new InvokeMethodResult();
  		invokeMethodResult.objectID = invokeMethod.objectID;
  		invokeMethodResult.responseID = (byte)responseID;
  
  		// Do not return non-primitives if transmitReturnValue is false.
  		if (!transmitReturnValue && !invokeMethod.cachedMethod.method.getReturnType().isPrimitive()) {
  			invokeMethodResult.result = null;
  		} else {
  			invokeMethodResult.result = result;
  		}
  
  		int length = connection.sendTCP(invokeMethodResult);
  		if (DEBUG) debug("kryonet", connection + " sent TCP: " + result + " (" + length + ")");
  	}