Fiat Coupe Forum
- Founded by Kayjey & James Northam
- Funded by the Club for the benefit of all owners
Fiat Coupe Club UK
join the club
Fiat Coupe Forum
 
» Announced
    Posting images


» Related sites
    Main club site
    fiatcoupe.net


» External data
    owners listed
 
Who's Online Now
0 registered members (), 175 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Forum Statistics
Forums69
Topics113,639
Posts1,341,429
Members1,814
Most Online731
Jan 14th, 2020
Top Posters(All Time)
barnacle 33,568
stan 32,122
Theresa 23,304
PeteP 21,523
bockers 21,071
JimO 17,917
Nigel 17,367
Edinburgh 16,849
RSS Feeds
Club Events
Club Information
Track Events
Rolling Road/RWYB
Social Events
Non-UK Events
Coupé Related Chat
Coupé Spotting
Coupé News/Press
Buying/Selling Advice
Insuring a Coupé
Basic FAQ's
How to Guides
Forum Issues
Technical Problems
General Maintenance
Styling
Tuning
Handling
ICE and Alarm
Coupés for Sale
Coupés Wanted
Parts for Sale
Parts Wanted
Group Buys
Business Forum
Other Vehicles for Sale/Wanted
Other Items for Sale/Wanted
Haggling/Offers
Ebay links
Other Cars
Other Websites
General Chat
Previous Thread
Next Thread
Print Thread
Any Java experts out there? #1589434
27/11/2016 00:18
27/11/2016 00:18
Joined: Jan 2006
Posts: 5,988
Sunny Darlo
Wishy Offline OP
Forum is my life
Wishy  Offline OP
Forum is my life

Joined: Jan 2006
Posts: 5,988
Sunny Darlo
Subtitle
Or at least someone better then me with the language.

Just thought I'd put this out to you good people before I run the gauntlet of stack exchange. I'm writing plugins for our Minecraft server (so it has to be done in Java) that need to be able to tell if a player has originated from inside my network (i.e. one of my two children (real human ones, just thought I'd clarify that)) or a user from the outside world.

How do I determine the gateway/router address in Java? I have been using isSiteLocalAddres() but the issue is that this method sees anything coming through my router (192.168.1.1) as being local. Obviously it's trivial to account for this exception specifically but I'm writing something that I'd like to publish. This means that I'll need to accommodate for everyone else's router IP address.

A quick google throws up this, call me a purist but that method is horrible. My main objection being the hard coding of the Amazon website address (although I could probably come up with more reasons).

Any ideas?

Last edited by Wishy; 27/11/2016 22:00.

Up yours Photobucket.
Re: Any Java experts out there? [Re: Wishy] #1589435
27/11/2016 00:32
27/11/2016 00:32
Joined: Jan 2006
Posts: 5,988
Sunny Darlo
Wishy Offline OP
Forum is my life
Wishy  Offline OP
Forum is my life

Joined: Jan 2006
Posts: 5,988
Sunny Darlo
A slightly less quick look suggests that the second (unaccepted) answer in the linked thread using netstat might be useful but my original question still stands.


Last edited by Wishy; 27/11/2016 00:32.

Up yours Photobucket.
Re: Any Java experts out there? [Re: Wishy] #1589478
27/11/2016 23:32
27/11/2016 23:32
Joined: Jan 2006
Posts: 5,988
Sunny Darlo
Wishy Offline OP
Forum is my life
Wishy  Offline OP
Forum is my life

Joined: Jan 2006
Posts: 5,988
Sunny Darlo
Note to self
A bit more reading of the SO solution has this having no platform independent method possible. Way to go Java with your platform independence. crazy

Looks like I'll need this too.


Up yours Photobucket.

Powered by UBB.threads™ PHP Forum Software 7.7.1
(Release build 20190129)
PHP: 7.3.33 Page Time: 0.011s Queries: 14 (0.005s) Memory: 0.7476 MB (Peak: 0.7937 MB) Data Comp: Off Server Time: 2024-05-17 12:54:35 UTC