I’m looking for the easiest way to redirect an RTMP connection request to another server. Something as simple as this would be great:
I realize that the above code is only for redirecting to other applications and NOT for redirecting to another server, so it didn’t surprise me that changing the “appUrl” property produced the following error:
Exception in thread “VHostHandler.defaultVHost.6” java.lang.Error: Unresolved compilation problem:
appUrl cannot be resolved
The change I made was:
tcUrlStr = tcUrlStr.replace(appUrl,"[new_server]");
connectObj.put(“tcUrl”, new AMFDataItem("[new_server]"));
connectObj.put(“tcUrl”, new AMFDataItem(tcUrlStr));
I’m guessing that the LoadBalancer code has an example of how to redirect RTMP connections but I’m having trouble finding it amid the other functionality in those 5 source files.
Is there a simple way to redirect RTMP connection requests to another server? or can you point me to the specific function inside the LoadBalancer code?