hi everyone,
is there a way to retrieve the SF server ip/url in a Actionscript server-side extension?
Get Server ip/url in Actionscript serverside extension
Hi.
Well, ActionScript by itself can't do that directly, but you can run Java classes in the ActionScript extensions. In java yes, it looks like its possible to retrieve the ip address, I suggest you to check this link, it has there the code to get the ip address.
You can check this chapter of the docs to check how to use Java in ActionScript extensions.
Well, ActionScript by itself can't do that directly, but you can run Java classes in the ActionScript extensions. In java yes, it looks like its possible to retrieve the ip address, I suggest you to check this link, it has there the code to get the ip address.
You can check this chapter of the docs to check how to use Java in ActionScript extensions.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Just in case anyone else needed this, I'll paste the as code for the extension. It's my very first ext so please don't be too strict
(thanks again to rjgtav for pointing me to those links!)
(thanks again to rjgtav for pointing me to those links!)
Code: Select all
function init () {
var lh = java.net.InetAddress.getLocalHost();
var ip = lh.getHostAddress();
trace("IP: "+ip)
}
function destroy()
{
trace("Bye bye!")
}
function handleRequest(cmd, params, user, fromRoom){
// code here...
}
function handleInternalEvent(evt)
{
// code here...
}
Return to “Server Side Extension Development”
Who is online
Users browsing this forum: No registered users and 60 guests