return waitForResponse((Byte)args[0]);
} else if (name.equals("getConnection")) {
return connection;
}
// Should never happen, for debugging purposes only
throw new KryoNetException("Invocation handler could not find RemoteObject method. Check ObjectSpace.java");
} else if (!remoteToString && declaringClass == Object.class && method.getName().equals("toString")) //
return "<proxy>";
InvokeMethod invokeMethod = new InvokeMethod();
invokeMethod.objectID = objectID;
invokeMethod.args = args;
CachedMethod[] cachedMethods = getMethods(connection.getEndPoint().getKryo(), method.getDeclaringClass());
for (int i = 0, n = cachedMethods.length; i < n; i++) {
CachedMethod cachedMethod = cachedMethods[i];
if (cachedMethod.method.equals(method)) {
invokeMethod.cachedMethod = cachedMethod;
break;
}
}
if (invokeMethod.cachedMethod == null) throw new KryoNetException("Method not found: " + method);
// A invocation doesn't need a response if it's async and no return values or exceptions are wanted back.
boolean needsResponse = !udp && (transmitReturnValue || transmitExceptions || !nonBlocking);
byte responseID = 0;
if (needsResponse) {