March 17, 201213 yr I am trying to see if I can check first whether a user has logged on to the client LAN where the Server sits or is at home logging in remotely so wrote this little function Use as you will, or make it better... // TestLAN ( IP ) // 12/03/18 JR // v1.0 // checks if you are on the LAN where FM server is running // used to see if a user can log on locally or is remote to limit layouts via WAN skt = new Socket() sktaddr = new InetSocketAddress(IP, 16000) try{ skt.connect(sktaddr, 1) } catch (e) { return 'ERROR not on this LAN' //return false } return 'on this LAN' //return true
Create an account or sign in to comment